Japan's Supreme Court has rejected a second appeal by the country's Islamic community against nationwide surveillance of Muslim groups, mosques and even halal restaurants.

Seventeen plaintiffs complained the government's security measures constituted "an unconstitutional invasion of their privacy and freedom of religion", says The Independent.

However, the Supreme Court dismissed the appeal as unconstitutional and so did not rule on whether the police profiling and surveillance tactics were lawful. A lower court had upheld them as "necessary and inevitable" to guard against international terrorism.

The case was brought after a 2010 police leak revealed officials were monitoring Japanese Muslims at places of worship, halal restaurants and Islam-related organisations across the country.

Japanese-born Muhammad Fujita (not his real name), who converted to Islam more than 20 years ago, told Al-Jazeera the Muslim community had been unfairly targeted for surveillance.

"They made us terrorist suspects," he said. "We never did anything wrong."

Fujita claims he and his wife have been spied on since the early 2000s. The police documents revealed that tens of thousands of individual Muslims had been extensively profiled, with files detailing their personal information as well as their place of worship.

Muslims have lived in Japan for more than 100 years, with the first mosque constructed in 1935, but they constitute a tiny religious minority.

Although the government does not compile official statistics, there are believed to be around 100,000 Muslims in the country, 90 per cent of them foreign-born and the remaining 10,000 or so ethnically Japanese.

"People of the Islamic faith are more likely to be targeted... despite not having any criminal activities or associations or anything like that in their background, simply because people are afraid," said NSA whistleblower Edward Snowden, speaking at a Tokyo symposium on government surveillance via a weblink.