Republicans are ratcheting up attacks on proposals to build a mosque near Ground Zero in New York ahead of November's midterm elections after Barack Obama endorsed the plan.

But even as some prominent Republicans compare the building of the mosque with Japanese attacks on the US, others are warning the tactic could backfire. A leading Democrat has called for an inquiry into those behind opposition to the mosque, suggesting it is being covertly funded.

The assault on the plans for the Islamic centre two blocks from Ground Zero is becoming an issue in congressional races far from the World Trade Centre site.

Newt Gingrich, former speaker of the House of Representatives, caused outrage suggesting Islam as a whole was responsible for the 9/11 attacks and drawing parallels with the second world war. "We would never accept the Japanese putting up a site next to Pearl Harbor," he said. "There is no reason for us to accept a mosque next to the World Trade Centre."

Gingrich has also claimed that the imam behind the proposed community centre, Feisal Abdul Rauf, is a "radical Islamist" even though the US state department flew Rauf to Saudi Arabia this week to promote America by telling audiences "what it's like to practise Islam under our regime of religious freedom and equality".

A common theme of the Republican attacks is Saudi Arabia's ban on non-Muslims from Mecca. "Ground Zero is hallowed ground to Americans,'' Elliott Maynard, a Republican candidate for Congress in West Virginia, said. "Do you think the Muslims would allow a Jewish temple or Christian church to be built in Mecca?''

Republicans have attacked Obama for endorsing the mosque, including Senator John Cornyn, who said the president's comments show he is "disconnected from the mainstream of America" and predicted that the controversy will be an important issue in the midterm elections.

Some Republican strategists fear the debate is a distraction from the economic issues on which Obama and the Democrats are most vulnerable. It also risks reinforcing the perception of the Republican party as intolerant of minorities, which may further damage it in states with a high proportion of Hispanic voters and alienating adherents to other minority religions.

A rising Republican star, Chris Christie, the governor of New Jersey, has accused both major parties of "playing politics with this issue". He said: "We have to bring people together and what offends me the most about all this is that it's being used as a political football by both parties.".

Obama faces disagreement from some democrats, including Harry Reid, the Senate majority leader who expects a fight for re-election in November. Reid's office said he respects freedom of religion "but thinks the mosque should be built someplace else".

Nancy Pelosi, speaker of the House of Representatives, has called for an official investigation into the opposition. "There is no question there is a concerted effort to make this a political issue by some," she said. "And I join those who have called for looking into how is this opposition to the mosque being funded." "How is this being ginned up that here we are talking about Treasure Island, something we've been working on for decades, something of great interest to our community as we go forward to an election about the future of our country and two of the first three questions are about a zoning issue in New York City."