A WTC site worker shows his opposition in this helmet sticker

US President Barack Obama has come out in favour of allowing a mosque to be built near the site of the former World Trade Centre, destroyed nine years ago by Arab terrorists in hijacked aircraft.

Obama said Muslims have the same right to follow their religion as anyone else. He said that includes the right to build a place of worship on private property in lower Manhattan.

The president made his remarks at an Iftar dinner at the White House celebrating the beginning of the Islamic holy month of Ramadan.

In doing so he waded into a national controversy that sparked passionate and at times angry debate.

Obama had not previously commented on the matter. The White House said it was a local issue.

The site is near where almost 3,000 people died on 11 September 2001, after Muslim hijackers flew two hijacked jetliners into the centre's twin towers, which crumbled.

"As a citizen, and as president, I believe Muslims have the same right to practise their religion as anyone else in this country," Obama said, weighing in for the first time on a controversy that has split New York and the nation.

"That includes the right to build a place of worship and a community centre on private property in lower Manhattan, in accordance with local laws and ordinances," he said. "This is America, and our commitment to religious freedom must be unshakable."

In voicing his support, Obama joins New York mayor Michael Bloomberg, who had been the only prominent politician to endorse it.

Former House speaker Newt Gingrich dubbed the plan an "assertion of Islamist triumphalism" and has denounced it in speeches.

Former Republican vice presidential candidate Sarah Palin wrote that "to build a mosque at Ground Zero is a stab in the heart of the families of the innocent victims of those horrific attacks".