ROME — A court in Naples on Wednesday convicted Silvio Berlusconi — the media mogul and Italy’s former prime minister — of corruption, finding him guilty of bribing a senator to undermine the government of his longtime opponent, Romano Prodi.

According to the verdict, Mr. Berlusconi should spend three years in prison and be banned from public office, but he will not serve the sentence because the statute of limitations on the case is expiring shortly. In Italy, defendants serve time only after two different courts have completed two levels of appeals trials, a process that normally takes years.

“It’s a verdict that we contend is shockingly unfair and unjustified,” Niccolò Ghedini, a lawyer for Mr. Berlusconi, told reporters. Mr. Berlusconi, 78, denied the charges and called the trial and the verdict “political” and aimed at “damaging his image as a protagonist in politics,” Italian news media said.

Sergio De Gregorio, who served in the Senate with the centrist Italy of Values party, admitted taking three million euros, about $3.3 million, from Mr. Berlusconi from 2006 to 2008, and he received a 20-month sentence after a plea bargain.