The defendant, named as 69-year-old Pietro L., was initially found guilty of indecency after masturbating in front of female students outside the University of Catania in Sicily.
He was given a three-month jail sentence and ordered to pay a fine of of €3,420 in March 2015 - a verdict which was upheld by the local court of appeal.
However, the Court of Cassation in Rome, Italy's top court, saw things differently and acquitted the man this week, following a hearing in June.
Pietro was defended by lawyer Raffaella Spagnoletto, who argued that it would have been hard for the passing students to see her client, due to the "reduced visibility of dusk" when the incident took place. The defendant also said he only carried out the practice "occasionally", La Stampa reported.
“The act is no longer regarded as a crime by the law,” the court ruled, citing a change in law made last year, which made it illegal to masturbate in front of minors. If under-18's are present, the act can carry a five-year jail sentence.
The man still faces a fine of between €5,000 and €30,000, with the precise amount to be determined by a Catania court, but will not serve any time in jail.
The verdict prompted criticism, with Elvira Savino from the centre-right Forza Italia party criticizing Renzi's government and saying: "To save people who commit obscene acts from prison is unjustifiable. The law is an invitation to every maniac to continue to molest women."
It's not the first time Italy's courts have come under fire for seemingly lenient rulings on sexual harassment.
A Palermo court earlier this year acquitted a 65-year-old boss of sexual harassment, arguing that he patted female employees' breasts and buttocks due to "immaturity" rather than for sexual arousal. And in 2014, the Court of Cassation ruled that a magistrate had been wrong to refer to a woman's 'tette' (tits) in the ruling of a sexual assault case.