An internet troll accused of sending an antisemitic message to Labour MP Luciana Berger has been sentenced to four weeks in prison at Merseyside magistrates court.

Garron Helm, 21, from Litherland, north of Liverpool, tweeted a picture of the MP with a Holocaust yellow star superimposed on her forehead, with the hashtag “Hitler was right”. The tweet, which referred to Berger as a ‘‘communist jewess”, read: “You can always trust a Jew to show their true colours eventually.”

Helm send the tweet in the early hours of the morning on 7 August and claimed to have sent it in a state of anger and frustration. He pleaded guilty to sending an offensive, indecent or obscene message.

Berger, the MP for Liverpool Wavertree, said she hoped the jail term would deter would-be trolls. “This sentence sends a clear message that hate crime is not tolerated in our country,” she said. “I hope this case serves as an encouragement to others to report hate crime whenever it rears its ugly head.”

When police searched Helm’s home they found Nazi memorabilia including an SS flag and flags from the British neo-Nazi group National Action. Helm’s twitter account, called “Æthelwulf” – Old English for Noble Wolf – links to the National Action website, which promotes a “free, white Britain”.

The account includes a tweet that refers to David Cameron and Ed Miliband as “Jews masquerading as Englishmen” and many references to far-right politics.

Recent high-profile victims of trolling have included campaigner Caroline Criado-Perez, politician Stella Creasy and Chloe Madeley, daughter of TV presenters Richard Madeley and Judy Finnigan.