DiMasi, 71, has served five years of an eight-year sentence on public corruption charges. He was diagnosed with and treated for throat and prostate cancer while in prison.

DiMasi’s doctors say his cancer is in remission, but his treatments caused a narrowing of his esophagus that creates a risk of choking when he eats or drinks. He now requires a pureed diet and has lost about 70 pounds, his lawyers have said.

Sal DiMasi leaves the Moakley Federal Court after his sentencing on September 09, 2011 with his wife Debbie, left, and his stepson Christian, right. (Photo by John Tlumacki/The Boston Globe via Getty Images)

In his ruling, Wolf said he found “extraordinary and compelling reasons” to warrant releasing DiMasi early from prison.

Debbie DiMasi told WBZ NewsRadio 1030’s Dan Rea that her husband will now be able to see specialists in Boston.

“I am overwhelmed. I’m thrilled, overwhelmed, it’s hard to believe,” DiMasi told WBZ. “More than anything I really am extremely grateful and really can’t wait to get him home and get him the healthcare he needs because he’s really been struggling.”

Debbie DiMasi during a 2014 interview. (WBZ-TV)

Debbi DiMasi said she emailed her husband about the ruling, but he likely won’t know for several hours.

“He does not know this is happening,” she said.

Debbie #DiMasi to @WBZNightside: Sal will find out he has earned early release later today – she'll give him the news on the phone. #mapoli

Wolf cited the opinion of the medical director of the U.S. Bureau of Prisons, who found that DiMasi must be monitored while he eats.

“This opinion is central to the court’s conclusion that DiMasi’s release is justified,” Wolf wrote.

Under Wolf’s ruling granting compassionate release, the once-powerful Democrat will be released Tuesday from a federal prison in Butner, North Carolina, to his wife.

“This is the right, just and fair decision,” said David Guarino, who formerly served as a top aide to DiMasi.

Current House Speaker Robert DeLeo released a statement Thursday on the judge’s decision.

“I’m elated and relieved that Speaker DiMasi will be released in time to be with his family on Thanksgiving,” DeLeo said. “I’m grateful to U.S. Attorney Ortiz for recommending compassionate release for the Speaker and to Judge Wolf for giving the recommendation fair and prompt consideration. Speaker DiMasi and his family have been, and will continue to remain, in my thoughts and prayers.”

DiMasi was first elected to the state Legislature in 1979 and worked his way up through the ranks of the House to become speaker following the resignation of Thomas Finneran in 2004. He was convicted of public corruption charges for steering state contracts to a software firm in exchange for $65,000 funneled through his private law firm.

DiMasi, who served as speaker from 2004 to 2009, was the third consecutive House speaker to leave office under an ethics cloud. He was convicted in 2011.

Compassionate release is intended for inmates with terminal illnesses as well as elderly inmates who have served a significant portion of their sentences.

“I just felt like you couldn’t stop fighting because you had to continue to fight for what was right and the right thing to do,” Debbie DiMasi said. “Yes, there were days when you felt beaten down, but you had to constantly focus on having hope and fighting for the right thing. For that reason, there was no giving up.”