Washington (CNN) -- President Obama threw his support behind a controversial proposal to build an Islamic center and mosque near New York's ground zero, saying Friday that "Muslims have the same right to practice their religion as anyone else in this country."

"That includes the right to build a place of worship and a community center on private property in lower Manhattan, in accordance with local laws and ordinances," Obama said at a White House Iftar dinner celebrating the Islamic holy month of Ramadan.

The president's remarks drew praise from New York Mayor Michael Bloomberg, who announced his support for the Islamic center last week.

Bloomberg compared Obama's speech to a letter President George Washington wrote in support of a Jewish congregation in Newport, Rhode Island. "President Obama's words tonight evoked President Washington's own august reminder that 'all possess alike liberty,' " Bloomberg said in a statement.

"I applaud President Obama's clarion defense of the freedom of religion tonight," he said.

To learn more about the "ground zero" mosque, see CNN's Belief Blog

Critics of the proposed Islamic center quickly denounced Obama's remarks. "President Obama is wrong," said Rep. Peter King (R-N.Y.). "It is insensitive and uncaring for the Muslim community to build a mosque in the shadow of Ground Zero. Unfortunately, the President caved into political correctness."

"While the Muslim community has the right to build the mosque, they are abusing that right by needlessly offending so many people who have suffered so much," King said in a statement. "The right and moral thing for President Obama to have done was to urge Muslim leaders to respect the families of those who died and move their mosque away from Ground Zero."

What do you think about this issue? Tell us on video

Obama, who said he was speaking both as a citizen and as president, invoked the attacks of Sept. 11, 2001, which critics of the Islamic center cite as the main reason for preventing its construction.

"We must all recognize and respect the sensitivities surrounding the development of lower Manhattan," Obama said, according to his prepared remarks. "The 9/11 attacks were a deeply traumatic event for our country."

"The pain and suffering experienced by those who lost loved ones is unimaginable," he continued. "So I understand the emotions that this issue engenders. Ground zero is, indeed, hallowed ground."

But Obama said one "reason that we will win this fight" against terrorism is "our capacity to show not merely tolerance, but respect to those who are different from us -- a way of life that stands in stark contrast to the nihilism of those who attacked us on that September morning, and who continue to plot against us today."

Repeatedly invoking the nation's founders and examples of religious tolerance from American history, the president argued that national ideals and the Constitution demanded that the project proceed.

He noted that Thomas Jefferson hosted the the first Iftar dinner at the White House more than 200 years ago and said that the country had previously seen "controversies about the construction of synagogues or Catholic churches."

"But time and again," he said, "the American people have demonstrated that we can work through these issues."

"This is America, and our commitment to religious freedom must be unshakable," Obama said. "The principle that people of all faiths are welcome in this country, and will not be treated differently by their government, is essential to who we are. The writ of our Founders must endure."

The proposed Islamic center has provoked vocal opposition from some families of 9/11 victims and other groups. Nearly 70 percent of Americans oppose the plan, according to CNN/Opinion Research Corporation Poll released Wednesday.

"Obama came out for the Islamic supremacist mosque at the hallowed ground of 911 attack," Pamela Geller, a leading foe of the Islamic center, wrote on her blog Friday night. "He has, in effect, sided with the Islamic jihadists."

Muslim Americans, meanwhile, applauded the speech. "It was pitch perfect and it was cut and dry," said Eboo Patel, executive director of the Interfaith Youth Core and a Muslim adviser to the White House on faith issues. "He said that our Founding Fathers built a nation on religious freedom where people from different faiths can pray and thrive and that is that."

Some Muslims said they were surprised to hear the president weigh in on the controversy.

"It's such a hot potato and he's already got so much on his plate and people jumping on him for any hint of an Islamic connection," said Akbar Ahmed, an American University professor who attended Friday's White House dinner. "But he plunged in and took a very bold position."

The Islamic center's leaders say they plan to build the $100 million, 13-story facility called Cordoba House three blocks from the site of the 9/11 attacks. The developer, Sharif El-Gamal, describes the project as an "Islamic community center" that will include a 500-seat performing arts center, a lecture hall, a swimming pool, a gym, a culinary school, a restaurant and a prayer space for Muslims.

On Wednesday, the project's developers declined an offer by New York Gov. David Paterson to relocate the project to a state-owned site.

Earlier this month, the New York City Landmarks Preservation Commission unanimously denied landmark status for the building where the proposed Islamic center would stand, allowing the project to move forward.