The man who doused Nigel Farage in milkshake was sentenced on Tuesday, and punished with a fine and 150 hours of community service.

A court hearing in Newcastle, England, also heard that Paul Crowther lost his job as a technical advisor for telecoms company Sky.

Crowther pleaded guilty to common assault and criminal damage. The judge called the milkshake toss an "act of crass stupidity."

Visit Business Insider for more stories.

A man who threw a milkshake over Nigel Farage has been ordered to perform 150 hours community service, and to pay Farage compensation, after pleading guilty to two criminal charges.

Paul Crowther, from Newcastle, northern England, was sentenced on Tuesday at North Tyneside Magistrates' Court for one count of criminal damage and another of common assault. Separately, his employer fired him.

The 32-year-old was charged after throwing a £5.25 ($6.57) banana and salted caramel shake at Farage, leader of Britain's Brexit Party, on May 20.

The incident and its aftermath were caught on camera, and went viral. It prompted a debate in the UK about the limits of acceptable political conduct.

Nigel Farage and Brexit Party candidates campaign in Newcastle Reuters

According to court reports from the BBC on Tuesday, Crowther was told to complete 150 hours of community work within the next 12 months.

Crowther was also fined £350 ($438), the BBC said. It reported that the figure was calculated as the cost of cleaning and repair for Farage's damaged suit and tie, as well as a microphone on his lapel.

The BBC reported that the court heard how Crowther was fired from his job as a technical advisor for telecoms company Sky after he was named as the man who threw the milkshake.

Crowther's attorney Brian Hegarty told the court it was a "moment of madness," the BBC said.

The outlet said that Crowther initially justified his actions by attacking Farage's public conduct.

It said he told reporters in Newcastle: "The bile and the racism he spouts out in this country is far more damaging than a bit of milkshake to his front."

This video, from Bloomberg, shows Farage walking around after being hit:

District judge Bernard Begley said Crowther had committed an "act of crass stupidity," the Daily Telegraph reported.

A crowdfund on GoFundMe called "Get Paul Crowther his milkshake money back" raised £1,705 ($2,135), significantly more than the fine.

Crowther's milkshake throw was part of a trend which saw several people linked to right-wing politics hit by milkshakes.

In early May, Tommy Robinson, a vocal British far-right presence and former leader of the English Defence League, was hit by two milkshake on two separate occasions in just 48 hours.

In mid-May, Scottish police stopped a McDonald's from selling milkshakes near a Nigel Farage rally.

During protests against Donald Trump's state visit to the UK on June 3, a Trump supporter was hit in the face by a milkshake.