Raggi, a member of the anti-establishment Five Star Movement (M5S) who became the city's first female mayor two years ago, was acquitted of corrupt practices over a senior appointment at city hall.
“This verdict has swept away two years of mud,” said Raggi, who burst into tears when her acquittal was announced.
In a Facebook post Raggi thanked the court for “putting an end to two years during which I was attacked in the media and politically with unprecedented violence and unjustified ferocity”.
Prosecutors had sought a ten-month jail term against the 40-year-old and if convicted she would have been forced to resign. Media reports said they were considering an appeal.
She had been accused of making false statements over the appointment of Renato Marra as her tourism director. Prosecutors claimed it was Renato's brother Raffaele — Raggi's former right-hand man — who got his sibling the job.
Raggi became mayor in 2016 after both the traditional left- and right-wing parties were seen to have failed to get to grips with a city drowning in debt and rocked by corruption scandals.
Photo: Filippo Monteforte/AFP
Earlier this year, the M5S struck a deal with the hard-right League to form a national coalition government despite glaring differences on issues such as immigration.
But in the capital, Raggi has struggled to build a team or fix the problems she inherited. Her popularity has plummeted and thousands gathered outside city hall late last month to demand she quit amid loud complaints about poor transport, inadequate refuse collection and general dereliction.
Raggi says her centre-left predecessor Ignazio Marino left the capital in disarray, leaving her insufficient time to fix matters as residents bemoan cases of buses that burst into flames, parks left to run wild and abandoned buildings taken over by drug pushers.
She says her job has not been made easier by no fewer than eight deputies coming and going through city hall's revolving door during her tumultuous time at the helm.
Marino was forced to resign in 2015 two years after taking office over allegations he fiddled his expenses. He was later cleared of wrongdoing.
Although Italian sentences of under two years are usually suspended, Raggi could have been forced to step down had she been found guilty as her party rulebook stipulates any member must resign even in the case of a shorter jail term, including a first offence. She had vowed to do so had the judgement gone against her.
Marra was arrested in December 2016 and faces separate corruption allegations which predate Raggi's arrival at city hall.
Raggi's woes have seen political rivals target her with Deputy Prime Minister Matteo Salvini, who is head of the League, particularly critical. Had she been forced out that would potentially have opened up the mayoralty to the far-right in the capital.
By AFP's Franck Iovene