ROME -- A court in Naples on Wednesday convicted former Italian Premier Silvio Berlusconi of corruption charges, accusing him of bribing a senator to weaken the government of his arch political rival.

The court also gave the media mogul a three-year prison sentence, but since the statute of limitations is expiring soon Berlusconi won't do prison time. In Italy, sentences are served only after two levels of appeals trials, which take years, are exhausted.

Berlusconi wasn't in court for the verdict. "It's a verdict that we contend is shockingly unfair and unjustified," a Berlusconi lawyer, Niccolo Ghedini, told reporters.

The court also banned Berlusconi from serving in public office for five years, but, again, that punishment won't apply due to the statute of limitations expiring this fall.

Prosecutors had alleged a senator was bribed to defect from a coalition supporting then-Premier Romano Prodi, the only politician who defeated Berlusconi in elections for the premiership.

During the trial, which began in February 2014, prosecutors alleged that the senator from a tiny centre-left party backing Prodi was paid 3 million euros between 2006 and 2008 to switch loyalties to Berlusconi's centre-right coalition, then Parliament's biggest opposition force.

Berlusconi denies the charge.

Sergio De Gregorio acknowledged accepting the money while a senator for Italy of Values, a party headed by former anti-corruption prosecutor Antonio Di Pietro. De Gregorio's plea bargain brought him a 20-month sentence.

The defence contended there was no proof of a deal between De Gregorio and Berlusconi and that shifting alliances are a normal part of politics in Italy.

Prodi, a former European Union commission chief, defeated Berlusconi in elections in 1996 and 2006. Prodi's second government depended on a razor-thin majority in the Senate, and it collapsed in 2008 amid bickering among allies.

Another trial defendant, Valter Lavitola, who prosecutors contended acted as a go-between between Berlusconi and De Gregorio, was convicted and also given a three-year prison term.

Some other criminal cases against Berlusconi ended when statute of limitations expired.

Berlusconi recently completed several months of community service -- assisting Alzheimer's patients in a residence near Milan -- as his punishment for a tax fraud conviction stemming from dealings in his media empire. The conviction, which was upheld by Italy's top criminal court, cost him his Senate seat.

But he won appeals of a conviction on charges that he paid for sex with a minor and then used his premier's office to cover it up.

Other judicial woes could loom for Berlusconi, whose Forza Italia party is in disarray after a string of electoral losses.

Milan prosecutors are investigating whether Berlusconi or his aides paid off witnesses or potential witnesses in the sex case, which stemmed from so-called "bunga-bunga" parties with young starlets and aspiring show girls at soirees at the billionaire's private residences.