The trial had captivated France, seen as a test of the ability of the courts to hold well-connected and long-established power players to account.
When in October the power couple was convicted of money laundering in a second trial, observers heralded the rulings as proof that French courts can hold the powerful to account.
His wife Isabelle Balkany also got two sentences – respectively three and four years – but she was not jailed due to poor health
The sentence banned both of them from holding public office for a decade.
They have appealed the sentences, with rulings scheduled for March 4th and April 22nd.
Pending the outcome of these appeals, Balkany retained his mayoral title even in prison and his wife, who is deputy mayor, is acting on his behalf.
The Balkanys have dominated politics in the wealthy suburb of Levallois-Perret, just north of Paris, for decades. They are close friends of former president Nicolas Sarkozy, himself in the crosshairs of French prosecutors in a number of corruption cases.
Based on expert medical testimony, the Paris appeals court on Wednesday judged Balkany’s health to be “hardly compatible with detention” and freed him under judicial supervision, with no requirement to pay bail.
A medical report had described a “deterioration” of the mayor’s general state of health and a “marked state of depression” that it said was “not compatible with ordinary detention”.
According to his doctors, Balkany suffered from digestive problems, and his family said he had lost 30 kilos in five months.
“My happiness cannot be described,” Isabelle Balkany told journalists outside the prison shortly before her husband was released.
Judges had rejected several previous legal bids for his release by Balkany, except for one that granted him bail of €500,000 – an amount he was unable to pay.
Under Wednesday’s ruling, he will be allowed to serve out his time at his home in Normandy in northeast France.
He is not allowed to leave France, and must report to the police twice a month.