A German court has ruled that a group of Islamists did not break the law in forming “sharia police” street patrols and telling people to stop drinking, gambling and listening to music.

The ultra-conservative Muslim group around the German Salafist convert Sven Lau sparked public outrage with their vigilante patrols in the western city of Wuppertal in 2014, but prosecutors have struggled to build a case against them.

The city’s district court ruled that the seven accused members of the group did not breach a ban on political uniforms when they approached people while wearing orange vests bearing the words “Sharia Police”.

Judges said there could only be a violation of the law – originally aimed against street movements such as the early Nazi party – if the uniforms were “suggestively militant or intimidating”, a court spokesman said.

In this case, they found that the vests were not threatening and noted that one witness said he thought the men were part of a bachelor party.

The same court had already thrown out the case last year, but was overruled on appeal by a higher court which agreed with prosecutors that the ban on uniforms could be applied in this case.

Monday’s verdict is not yet final and may still be appealed.

The “sharia police” members walked the streets of Wuppertal in September 2014, telling nightclub-goers to refrain from drinking alcohol and listening to music, and arcade customers not to play games for money.

Lau, the organiser, is one of Germany’s most controversial and best-known Islamist preachers. He is currently on trial in a separate case on charges of backing “a terrorist group” fighting in Syria.

So-called “sharia patrols” by sometimes violent radical young Salafists have also been seen in other European cities such as London, Copenhagen and Hamburg.