A man who attacked the Respect MP George Galloway in the street while calling him an “antisemitic little man” has been jailed for 16 months.

Neil Masterson, 39, left the MP for Bradford West with cuts and bruises to his head and ribs and requiring hospital treatment after the assault in Notting Hill, west London, in August.

Masterson, who was wearing a T-shirt with an Israel Defence Forces logo when he was arrested nearby, told police he felt “morally justified in attacking the pro-Palestine MP because he was a “Nazi” with a shameful attitude towards Jews, Isleworth crown court heard.

Galloway, the court heard, believes he would have been killed if Masterson, who had recently converted to Judaism, had been armed with a knife during their chance meeting.

Masterson, from Kensington, west London, who used to work for the Department for Work and Pensions and as a manager at the BBC, had previously admitted assaulting Galloway and common assault on a man who had been posing for a picture with the MP when the attack happened.

Judge Aidan Marron QC told Masterson: “While you are no longer facing a charge of religiously aggravated assault, it would be unreal to ignore that the motivation for this … was your profound hostility to Mr Galloway’s views.”

He added that Masterson’s “loathing” of Galloway was manifested by what he did at the start of the assault and said afterwards in interviews.

The court heard that Galloway, 60, had been in London on private business when the attack happened at around 7.25pm on 29 August.

He was posing for a photograph near his car in Golborne Road with Moroccan doctor Mostafa Maroof and a friend when Masterson approached them “in a rage”, prosecutor Michelle Nelson told the court. She said Masterson mentioned the Holocaust, leading Galloway to fear he was a rightwing extremist.

The attack included 10 punches and a “kung-fu style” kick which did not connect but caused Galloway to fall into the road, where Masterson continued hitting him, the court heard.

Maroof, who was shoved over in the attack, and his friend managed to push Masterson away and prevent him from launching another attack before Masterson fled on to a bus. The three men called 999 and got into Galloway’s car to follow Masterson’s bus, despite police telling them not to.

They flagged down a passing patrol car which stopped the bus and officers arrested Masterson.

Nelson said Masterson admitted to police that he had said “antisemitic little man, I fucking despise you” during the attack and described Galloway as “a morally and intellectually bankrupt person”.

She added: “The defendant said he wanted to make Mr Galloway realise that his attitude towards Jews was shameful, it shames all Catholics and it shames anyone who has any idea of humanity. He felt he [Galloway] is a serpent in a way.

“He felt he was morally justified in assaulting Mr Galloway. He said he thought Galloway was a Nazi and his political views were hate.”