An Italian appeals court has cleared Silvio Berlusconi of having sex with an underage prostitute and abuse of power in a surprise ruling that will strengthen the former prime minister on the political scene.
Prosecutors had asked the judges to uphold the seven-year sentence for having sex for money with an exotic dancer called Karima El-Mahroug, who is now better known by her stage name as "Ruby the Heart Stealer".
"The defendant is acquitted," Enrico Tranfa, the presiding judge, said on Friday, requesting silence after gasps from the court.
He said there was "no crime" on the abuse of power charge and that Berlusconi's actions "did not constitute a crime" on the prostitution one, promising to publish a detailed explanation within the three-month legal limit.
Franco Coppi, Berlusconi's lawyer, said that the ruling had "exceeded our highest expectations", explaining that the judge may have recognised the defence argument that Berlusconi did not know the girl was 17 years old.
Berlusconi, the 77-year-old media magnate, was not present at the hearing in Milan as he is doing his once-a-week community service at a centre for Alzheimer's patients for a separate tax fraud conviction linked to his business empire, Mediaset.
He left the centre at Cesano Boscone near Milan following the ruling without making any comments, while a lone supporter held up a sign reading: "Justice is served".
Berlusconi had also been convicted of pressuring the police while he was still prime minister to release El-Mahroug from custody when she was arrested for theft - apparently out of concern that she could reveal their liaison.
Prosecutors, who had relied on phone intercepts and statements made and then denied by El-Mahroug, could now apply to the supreme court to review the ruling.
The ruling will have political repercussions, providing a respite from the legal storm around Berlusconi.
In advance of the verdict, his Forza Italia party had been riven with internal divisions since a ruling against him would have opened the possibility of Berlusconi being excluded from the political scene entirely.
"This ruling will bring people together. We will be calmer working in future and be more united between ourselves and with all of the centre-right," Lucio Malan, a Forza Italia senator, told the SkyTG24 news channel.
Berlusconi is also currently on trial for allegedly bribing a senator with 3m euros ($4m) in 2006 to join his party and destabilise a centre-left government.
In another case, prosecutors have requested that he face trial on suspicion of paying off a pimp to provide false testimony in an investigation on prostitutes who attended parties at his residences in Milan and Rome.
Berlusconi is also being investigated for allegedly paying off witnesses in the Ruby trial - the young women who attended his soirees - to provide false testimony.
The charges in that case have not yet been formally levied.
The legal saga also has political significance for Matteo Renzi, Italy's prime minister, since his centre-left government is relying on votes from Berlusconi's centre-right opposition coalition to pass through key constitutional reforms.
Italian media have reported that Berlusconi may be sticking to a pact with Renzi on the reforms, including an overhaul of the electoral law, in the hope of receiving an amnesty.
President Giorgio Napolitano has ruled out any possible pardon until Berlusconi, who has always protested his innocence and says he is the victim of a left-wing plot by prosecutors and judges, recognises his guilt.