A Jewish man repeatedly punched George Galloway in the face because he "was an enemy to Judaism," a court heard this week.
Former BBC manager Neil Masterson, 39, is alleged to have shouted about the Holocaust and then assaulted Mr Galloway as he posed for pictures with members of the public in Golborne Road, west London.
He is also accused of pushing away another man who tried to stop the attack.
Mr Galloway was taken to St Mary's Hospital, Paddington, for treatment on Friday and kept in hospital overnight. The Respect MP for Bradford West suffered bruising and swelling to his face.
Mr Masterson of Campden Hill, Kensington, pleaded not guilty to assault by beating which is religiously aggravated when he appeared at in Hammersmith Magistrates' court this week.
He is also pleaded not guilty to common assault on a man in his 40s who is said to have come to Mr Galloway's aid.
Prosecuting, Tom Gill told the court that Mr Masterson had said "he carried out the attack because he felt the victim was an enemy of Judaism".
Mr Gill added that Mr Masterson told the police: "I didn't want him to think I'm scared. Galloway is antisemitic and I am Jewish."
Mr Masterson spoke only to confirm his name, address, date of birth, and to enter his not-guilty pleas.
However he admitted possession of cannabis, which the police found when they arrested him.
Mr Masterson is a full-time carer for a middle-aged woman who suffers from severe memory problems, Chrones disease, and an inflamed gall bladder.
His defence lawyer, Mark Fanthorpe, said the woman "would be lost without him".
He said that Mr Masterson was employed at manager level at the BBC between 2004 and 2007.
Mr Masterson was denied bail and is due to appear before Isleworth Crown Court on September 15.