The surveillance camera footage of the 25-year-old man attacking Marie Laguerre, a 22-year-old student, outside a cafe in July went viral after she posted the video on social media.

The attack made headlines around the world, triggering an outpouring of solidarity with Laguerre

Paris:

A French man caught on camera slapping a young woman on a Paris street after she berated him for making lewd comments was given a six-month custodial sentence on Thursday.

The surveillance camera footage of the 25-year-old man attacking Marie Laguerre, a 22-year-old student, outside a cafe in July went viral after she posted the video on social media.

It showed him picking up an ashtray and hurling it at her and then hitting her across the face.

In her Facebook account of the attack Laguerre said he used "dirty language, in a humiliating and provocative manner" when she passed him in the street and that she told him to "shut up and kept walking away".

On Thursday, the court ordered the accused to pay 2,000 euros in damages to Laguerre, forbade him from making contact with her and also ordered him to attend classes on sexist violence and violence among couples.

It also ruled that if he reoffends within the next three years he will have to serve another six months in prison.

The defendant, who has already served prison time for pimping and violence against his mother, admitted to the physical attack but denied making lewd remarks.

"There's not a man who has not spoken to a woman on the street," he defended, claiming he merely complimented Laguerre on her red dress and accusing the judge of "nitpicking".

Reacting to the ruling Laguerre hailed it as "balanced" and said she was particularly glad her attacker had been ordered to attend an anti-sexism course.

The attack made headlines around the world, triggering an outpouring of solidarity with Laguerre.

She has since set up a website entited "Nous Toutes Harcelement" (We are all harassed), to collect similar stories of street harassment.

French lawmakers in August passed a new law against sexist violence which makes catcalling in the street a crime punishable with on-the-spot fines.

The law covers behaviour including comments on a woman's looks or clothing, catcalling, intrusive questions, unwanted following and "upskirting" -- taking pictures under a woman's dress without her knowing.