A German court has ruled that seven Muslim men who formed a vigilante street patrol did not breach a ban on political uniforms.

The accused sparked outrage in 2014 when they patrolled streets in the western city of Wuppertal, wearing orange-colored safety vests bearing the words "Shari'a Police."

They demanded that local Muslims stop drinking alcohol, gambling, and listening to music.

Wuppertal's district court ruled on November 21 that the seven vigilantes could only have broken the law if their uniforms were "suggestively militant or intimidating," a court spokesman said.

The verdict may be appealed.

The ban on political uniforms was originally aimed at street movements such as the early Nazi party.

The group's alleged leader, Sven Lau, is currently also on trial on terrorism charges in Duesseldorf. He is accused of supporting a terrorist group fighting in Syria.

Based on reporting by AP, AFP, and dpa