The focus on minority rights “should not result in overlooking the rights of the majority” when it comes to freedom of speech, the High Court has said.

Two judges were rejecting appeals by five Muslim men who staged a protest as British soldiers who had recently returned from Afghanistan paraded through Luton.

They ruled the protests, which included accusing the troops of being “rapists, murderers and baby killers”, went well beyond “legitimate expressions of protest”.

The five demonstrated against the Iraq and Afghanistan wars as the Second Battalion the Royal Anglian Regiment, known as the Poachers, made its way through the city on March 10 2009.

The five were all convicted of public order offences by Luton Magistrates’ Court.

Jalal Ahmed, 22, Munim Abdul, 29, Yousaf Bashir, 30, Shajjadar Choudhury, 32, and Ziaur Rahman, 33, all from Luton, were found guilty of using threatening, abusive or insulting words likely to cause harassment, alarm or distress.

The five appealed to the High Court in London, arguing that they had been legitimately exercising their Article 10 rights to freedom of expression and to protest under the European Convention on Human Rights.

Rejecting their appeal, Lord Justice Gross said today: “There was all the difference in the world between expressing the view that the wars in Iraq and Afghanistan were illegal or immoral and that British forces should not be engaged in them and the abusive and insulting chants of the appellants.”

In a ruling which will provide guidance for future similar cases, the judge said: “To attend a parade of this nature and to shout that this country’s soldiers were ‘murderers’, ‘baby killers’, ‘rapists all of you’ who would or should ‘burn in hell’ gave rise to a very clear threat to public order.”

The judge said it was the good fortune of the five, “most probably attributable to skilful policing”, that there was no serious outbreak of violence.

The judge observed the right to freedom of expression was important and sometimes protesters were to be protected.

But it was not an unqualified right and “the justification for invoking the criminal law is the threat to public order”.

In striking “the right balance when determining whether speech is ‘threatening, abusive or insulting’, the focus on minority rights should not result in overlooking the rights of the majority”, said the judge.

Mr Justice Davis agreed and added that the right to exercise freedom of expression “necessarily carries with it duties and responsibilities”.

In the case of the five, people present at the parade included families and well-wishers of the regiment who were upset and offended, meaning trouble arose.

The judge said: “It is to be noted that what these appellants were chanting included comments specifically directed at the nearby marching soldiers.

”These were not just generalised statements of views, vigorously expressed, on the morality of the war but were personally abusive and potentially defamatory of those soldiers.

”That the soldiers themselves were, as it happened, broad shouldered enough not to care one jot does not matter”.