Paul Crowther, 32, pleaded guilty to common assault and criminal damage, the British Broadcasting Corporation (BBC) reported Tuesday. He was sentenced to 150 hours of unpaid work assessment and is also required to pay Farage 350 pounds (about $440).
Crowther last month hit Farage with a banana and salted caramel milkshake.
District Judge Bernard Begley called the incident “an act of crass stupidity” according to the BBC.
Defense solicitor Brian Hegarty called the incident “a moment of madness” and said that Crowther now regrets it, according to the news outlet.
“The fact is, it is said to be a politically motivated incident which has caused him to appear before this court and caused him to lose his good name,” he said.
Prosecutor James Long said the attack shocked Farage, who did not know for a moment whether he was hit with a milkshake or “something more sinister”.
Crowther told reporters at the time that the incident was “a right of protest against people like him.”
“The bile and the racism he spouts out in this country is far more damaging than a bit of milkshake to his front,” he said of Farage.