When officials in Sterling Heights voted 9-0 to refuse permission to build a mosque last summer, they said they had done so over concerns about traffic.

But many in the Michigan community suspected a more sinister motive.

Now, the community has filed a lawsuit, accusing the officials of discrimination after uncovering emails that showed officials talked of their fears abut being investigated because the mosque leaders might be “terrorists”

At the same time, it has emerged that federal prosecutors and the Department of Justice are investigating whether the mosque was treated fairly.

“With a vociferous and racist member of the Planning Commission leading the charge, the Planning Commission voted to reject the site plan,” said the lawsuit, filed in US District Court in Detroit on Wednesday.

“With no other choice, the American Islamic Community Centre has filed this suit seeking equitable relief to build the mosque and seeks damages as the City of Sterling Heights’ conduct violates, among other things, the Religious Land Use and Institutionalised Persons Act…and the First and Fourteenth Amendments to the United States Constitution.”

The Detroit Free Press said that summer, city officials and local residents said the decision to oppose the mosque was based on concerns that the location was not suitable for such a large building and could cause traffic problems.

In the lawsuit, the American Islamic Community Centre accuses the city of being biased against Muslims. In one email it cites, a police official asks whether the FBI can be contacted to see whether the mosque leaders are “on their radar”.

The mayor of Sterling Heights, Michael Taylor, has so far declined to comment.

US Attorney Barbara McQuade said on Wednesday: “The Department of Justice and US Attorney's Office have been conducting an independent investigation, and that investigation is ongoing.”

The main lawyer in the case, Azzam Elder, said in a statement: “We all know of a time in our history when sentiments in America were anti-Catholic, anti-Jewish, anti-German, anti-Japanese, or anti-Black, and those times have forever stained on our history.