The ringleader of a gang whose criminal tentacles reached into almost every department of Rome’s City Hall was sentenced to 20 years in prison by an Italian court on Thursday.

Massimo Carminati, 59, a convicted gangster with a history of involvement with violent far-right groups, had been accused, along with 45 others, of operating a “mafia-style” network that used extortion, fraud and theft to divert millions of euros that had been destined for public services.

His righthand man and fellow defendant, Salvatore Buzzi, 61, was given a 19-year jail term by the court at the capital city’s Rebibbia jail.

The scandal, which led to a 20-month trial in the high-security prison, had been dubbed “Mafia Capitale” by the media. But the judge, Rosanna Ianniello, said Carminati and Buzzi were guilty of corruption not of mafia association.

“The sentence is stiff, but the whole trial revolved around the question, ‘was it mafia or not?’” said Carminati’s lawyer, Ippolita Naso. “Mafia Capitale does not exist.”

Of the 46 people on trial, five were acquitted, including two men accused by prosecutors of being the link between the criminal band and the powerful ’Ndrangheta mafia in Calabria, southern Italy.

The trial at Rebibbia jail. Photograph: Massimo Percossi/EPA

Carminati and Buzzi were already behind bars in prisons in Parma and Tolmezzo where they were kept under the notoriously harsh 41-bis regime, aimed at cutting mafia inmates off completely from their former criminal associates.

“The 41-bis will have to be repealed. But who will give Carminati back the 22 months spent under it?” said his lawyer, Giosue Bruno Naso.

Carminati and Buzzi watched the verdict by video conference, Carminati standing to hear his sentence while Buzzi sat and took notes.

Carminati was given a 10-year prison term in 1998 for membership of the Banda della Magliana, a criminal crew which ruled Rome’s underworld in the 1970s and 1980s. His brother Sergio told media at the court that the trial was “ridiculous, Massimo is still paying for the 1980s”.

In 1983, Buzzi received a 30-year prison sentence for the murder of an accomplice in a forged cheques racket. He served only six years after pursuing his education and successfully portraying himself as a reformed character.

The Rome scandal was a big factor in leaving the city so cash-strapped it can now barely afford to repair its buses when they break down, fill potholes in its streets, or prevent trees from falling over from lack of upkeep.

The city’s mayor, Virginia Raggi, said a deep wound had been inflicted on Rome by “a criminal association able to heavily influence the political decisions of this city”. She added: “We are paying the price every day. We now need to stitch the wound back together by taking the path of legality – no easy task. We need to keep our eyes peeled [for corruption] at all times.”