Former Labour leader Jeremy Corbyn was left "alarmed and distressed" after being spat at during last year's first wave of coronavirus infections, a court has heard.
Ex-plumber Gerald Dore was sentenced on Friday for his assault on Mr Corbyn on 20 May near the MP's north London home.
Westminster Magistrates' Court was told Mr Corbyn and his wife, Laura Alvarez, were out cycling when they stopped at the corner of Seven Sisters Road, where Dore was waiting to cross.
Dore, of Conistone Way, Islington, swore at Mr Corbyn, after the politician gestured to let him cross and then told him there was "no need to use that language".
Prosecutor Matt Barrowcliffe told the court: "He began shouting and swearing aggressively towards both parties before ultimately taking a step towards Mr Corbyn and spitting."
In a statement read to the court, Mr Corbyn said: "I was alarmed and distressed by the aggressive behaviour towards me, in particular spitting in my face."
Representing himself, Dore said the incident was not motivated by Mr Corbyn's politics.
The 56-year-old told the court: "I don't know him. I didn't dislike him, he was just in my way and I was trying to get home.
"All I was trying to do was cross the road and he was in the way. I might have sprayed him."
Dore previously admitted one count of assault by beating against Mr Corbyn and a second charge of using threatening, abusive or insulting words or behaviour with intent to cause fear of unlawful violence.
He was given an 18-month community order, including 80 hours of unpaid work, and also ordered to pay £150 in compensation to Mr Corbyn and £100 to Ms Alvarez.
Dore said he has chronic pain and mental health issues, and the court was told he has a lower culpability.
Subscribe to the Daily podcast on Apple Podcasts, Google Podcasts, Spotify, Spreaker
District Judge Adrian Turner said: "To spit at someone is gross in any circumstance but to do so at a time when the infections were running very high was very serious indeed."
Rob Hutchinson of the CPS said the incident was "completely unacceptable".
He added: "At a time the country was reeling from the effects of COVID-19, Dore without provocation spat in the face of a prominent member of parliament and during an expletive-ridden onslaught, physically threatened Ms Alvarez."
Mr Corbyn, who now sits as an independent MP in the House of Commons, later revealed he would be donating the compensation to charity.
"As people may have seen in media reports today, in May last year I was spat at in an unprovoked assault," he posted on Twitter.
"I would like to put on record my thanks to the police for their speedy response at the time and co-operation since."