A German court has found seven men who formed a self-styled "Sharia police" guilty of violating rules on wearing uniforms.

German news agency dpa reported that a court on Monday fined the men, aged between 27 and 37, to penalties ranging from 300 euros ($335) to 1,800 euros ($2,015).

The group took to the streets of the western city of Wuppertal in 2014, dressed in orange vests bearing the words "Sharia police" and handing out leaflets declaring the area a "Sharia-controlled zone" where alcohol, music and pornography were banned under Islam's Sharia law.

The court said the group and their helpers were aware of the militant effect they were trying to achieve.

They were acquitted in 2016 when judges found that the vests couldn't be classified as a uniform and weren't intimidating. A federal court ordered a retrial.