Leaders of the far-right group the English Defence League have lost a High Court fight for the right to demonstrate in an area of east London.
The EDL planned to march through Tower Hamlets, which it says is "subject to Sharia law".
But the Metropolitan Police shortened the route of Saturday's march over concerns of "serious public disorder".
Mr Justice King ruled against the EDL and said the police restrictions were reasonable and proportionate.
He refused the EDL's application for a judicial review.
During the hearing, Jamas Hodivala, for the EDL said the police had imposed "disproportionate" restrictions on the march route, which included cutting it by a third of a mile, and the EDL had previously been prevented from gathering in Tower Hamlets.
He said: "The EDL wishes to go into Tower Hamlets to demonstrate against two things.
"The first thing is that Tower Hamlets is an area that has become, some would say, subject to Sharia law and the EDL wish to highlight that fact by demonstrating in Tower Hamlets.
"The second point is that there are occasions when individuals in the Tower Hamlets area have been subject to assault for failing to comply with Sharia law."
Mr Hodivala said rights to freedom of expression and of assembly enshrined in the European Convention on Human Rights had to be "jealously scrutinised and jealously guarded".
But George Thomas, for the Metropolitan Police, said people taking part in EDL marches could be "unreasonably" provocative and he believed between 1,000 and 2,000 people would take part in the EDL march and "several thousand" in counter-demonstrations.
He said this could leave the police facing "crisis management".
Mr Justice King was told that Tower Hamlets had the biggest Muslim population in the country.