An Italian appeals court has acquitted former premier Silvio Berlusconi in a sex-for-hire case.

The court's decision also throws out his seven-year-prison sentence and lifetime ban on holding political office, handed to him by a lower court when it convicted him last year.

Mr Berlusconi had been accused of of paying for sex with an under-age prostitute and then using his influence to cover it up.

The case revealed details of raunchy, sex-fuelled "bunga-bunga" parties at Mr Berlusconi's private villa attended by a bevy of aspiring showgirls.

The acquittal came as Mr Berlusconi was leaving a facility for Alzheimer's patients where he is performing a community service sentence in a separate tax fraud conviction.

That is the only case finalised against Berlusconi, who faces dozens of trials, mostly for his business dealings.

He thrust his hand from a car as he was being driven away from the facility and a political supporter grabbed his hand and shook it. The window was then rolled up and the media mogul waved as he was driven away.

Prosecutors can challenge the acquittal in Italy's highest criminal court, the Court of Cassation.

The 77-year-old three-time former premier remains influential on the Italian political scene as head of his Forza Italia party, despite the tax fraud conviction's ban on holding political office for two years.