The flagging career of Italy's former prime minister, Silvio Berlusconi, was given a dramatic boost on Friday after a court in Milan cleared him of both charges in a lurid trial that cemented his international reputation as an ageing playboy politician and made "bunga bunga" a household term.

More than 12 months after he was sentenced to seven years in prison and slapped with a lifetime ban on holding public office, Berlusconi was acquitted on appeal of paying for sex with an underage prostitute and abusing his office to cover it up.

Prosecutors will be able to launch another appeal against that ruling, but the judgment nonetheless marks a boost for the 77-year-old, who denied the charges and insists he is the victim of a personal vendetta by leftwing Italian judges.

"I am deeply moved: those who have been close to my these past years know how I have suffered for an accusation that was unfair and ignominious," said the four-time prime minister in a statement on Friday. His girlfriend, Francesca Pascale, was quoted as saying it was "the best day of my life. I cried like a baby."

The news of his acquittal broke as he was carrying out a community service shift at a hospice for Alzheimer's patients outside Milan.

As he left the Fondazione Sacra Famiglia he wound down the window of his car to greet a female fan, who had made a congratulatory sign declaring "Justice done and deserved". "Thank you, thank you," he was reported to have told her.

He later thanked those who had stood by him during the attempts to "sully" his reputation. "It is thanks to them I have been able to resist, on a human level and on a political level," he said.

The leader of the centre-right Forza Italia party is working regular shifts at the hospice as dictated by the sentence for a tax fraud conviction made definitive by Italy's highest appeals court last year.

That ruling – which was his first in almost 20 years of judicial cat-and-mouse and saw him removed from the Italian senate – is unaffected bythe verdict in Milan. Berlusconi's legal woes do not stop there: he is also on trial for allegedly bribing a senator to join his party in 2006.

But, for now, his lawyers were jubilant. One, Franco Coppi, said the appeal court verdict in the so-called "Rubygate" trial went "beyond the rosiest of predictions".

There was "no crime" on the abuse of power charge and Berlusconi's actions "did not constitute a crime" on the prostitution one, the presiding judge, said. In Italy judges have 90 days to make public their reasoning, but Coppi speculated that the cause of their decision lay in a belief that the then premier had not realised the woman in question was underage at the time. Adult prostitution in Italy is not a crime, but paying someone under 18 for sex is.

Karima el-Mahroug, the young Moroccan woman at the centre of the allegations against Berlusconi, was 17 when the pair are alleged to have had sex in 2010. A former nightclub dancer, whose stage name was Ruby the Heartstealer, she denies having any kind of sexual relations with him and says the thousands of euros he gave her were merely the act of a benevolent paternal figure.

The more serious charge in the case was that in May 2010 Berlusconi exerted prime ministerial pressure on police in Milan to release Mahroug from custody for fear she would reveal details of their alleged liaisons. He admitted having made a call to police, but said he did so in the belief that her detention might cause a "diplomatic incident" because he believed her to be a relative of Hosni Mubarak, then the president of Egypt.

It was unclear what impact Friday's verdict would have on Italy's ever-delicate political balance, though it is almost certain to have repercussions.

Despite Berlusconi's influence, Matteo Renzi, the centre-left prime minister, is relying on votes from the centre-right Forza Italia to push through key constitutional reforms.

The elder politician indicated on Friday that the pact would continue, saying in his statement that the political strategy of his party "is unchanged".