Former Massachusetts Speaker of the House Sal DiMasi, who spent five years in prison on corruption charges before he was released in 2016 for health reasons, said the U.S. Bureau of Prisons is “a rogue agency” and needs to get better at caring for sick inmates.

In his first interview since he went to prison, DiMasi told Jim Braude on Greater Boston Wednesday, "It’s systemic within the organization. The Bureau of Prisons does not provide the healthcare needed, not just for me, but for everybody. .... There is no support."

DiMasi’s legacy in Massachusetts is a complicated one. During his time on Beacon Hill, he helped push through landmark laws like universal healthcare and greenhouse gas limits, and he kept a ban on gay marriage off the ballot. But in 2008, he was accused of accepting $65,000 in kickbacks for steering multi-million dollar state contracts to a Burlington-based software company, and he resigned soon after. He was convicted in 2011 of extortion, conspiracy and fraud.

A year into his eight-year sentence, DiMasi was diagnosed with cancer of the tongue and lymph nodes, leading his wife and legal team to launch a years-long battle for his compassionate release. He was later diagnosed with prostate cancer as well and was granted early release in 2016. DiMasi is now in remission, which he credits to getting the medical care he needed outside of the prison system.

“It shouldn’t be just for me,” he said of his early release, explaining that he was mistreated while in prison and thought he was going to die there. Now, he’s using his platform to speak out on behalf of others.

Read more: First Massachusetts 'Compassionate Release' Prisoner Goes Home

"I can give you examples of the inhumane and cruel treatment that was in prison for lack of medical care — people dying every single day," said Dimasi. "You have no idea what it was like seeing people drop off like flies. Every other day, someone in my unit would die and they would do nothing about it."

DiMasi said he also spent a lot of time in prison trying to help others in their requests for compassionate release, but almost always met dead ends. “I was frankly disgusted by the ways the Bureau of Prisons was refusing them and obfuscating the process,” he said.

Calling the specifics of his case a “complicated issue,” DiMasi declined to answer whether he thought he had broken the law for which he received his prison sentence.

"I did the best I could under the circumstances and everything that was presented to me, and I tried to comply with the law in every single way,” he said.

“I’ve spent probably the last 10 years trying to put that in the past," he continued. "The conviction is behind me ... and now I have to deal with the reality of what happened to me."

This article has been updated.