Former Jerusalem mayor Uri Lupolianski was sentenced to six years’ imprisonment Thursday and fined half a million shekels ($145,000) for accepting bribes in the Holyland affair.

Judge David Rozen ruled that Lupolianski, despite suffering from cancer, will serve out his sentence in prison. Rozen had previously decided to postpone a June 9 sentencing hearing after Lupolianski was hospitalized with pneumonia.

The relatively lengthy jail term came as a surprise after the judge reportedly told prosecutors that he was leaning toward a lighter sentence due to Lupolianski’s ailing health and the fact that he had not taken any bribes for himself. Lupolianski used most of the bribe money he received in the Holyland affair — NIS 1.25 million — to fund Yad Sarah, one of Israel’s largest charitable organizations, which he founded.

Rozen said that while he had taken all of the mitigating factors into consideration, in the opinion of the justice and prison systems Lupolianski would be able to serve his sentence under suitable conditions, despite his illness.

He added that even though Lupolianski had used the bribes for charity, it did not offset the damage his actions had caused and the fact that he had committed the same crimes as others convicted in the affair.

“The defendant’s actions undermined public confidence in its leaders,” Rozen said. “This is a man who has done much for the public, did charitable work and didn’t take anything home, but by taking the bribes he increased his own power.”

Lupolianski was one of nine people, including former prime minister Ehud Olmert, convicted of wrongdoing in Holyland graft case, widely considered the gravest public corruption scandal in Israel’s history.

Holyland is a hulking hilltop development that Jerusalem residents long suspected was tainted by corruption. The case broke in 2010 after Shmuel Dachner, a businessman who was involved in the project, turned state’s witness. Dachner died from an illness in 2013, in the midst of the trial and before Olmert’s attorneys had completed their cross-examination of him.

Olmert was sentenced in May to six years in prison, a two-year suspended term, and a fine of NIS 1 million ($289,000) for his role in the affair.