"Let me say this as clearly as I can. The United States is not and never will be at war with Islam. In fact, our partnership with the Muslim world is critical ... in rolling back a fringe ideology that people of all faiths reject," he said.
The president said that America's relationship with the Muslim world would not be based on opposition to al-Qaida -- perpetrators of the Sept. 11, 2001 terrorist attacks -- and that the United States has been "enriched" by Muslim-Americans.
"Many other Americans have Muslims in their family, or have lived in a Muslim-majority country. I know because I am one of them," he said to applause, reported the New York Times.
Turkey has a majority Muslim population and a secular democratic government, which has put it in the position of being a bridge between the Muslim and Western world. Turkey also is looking to join the EU, a goal Mr. Obama touted in his speech.
"Let me be clear: the United States strongly supports Turkey's bid to become a member of the European Union," Mr. Obama said. "We speak not as members of the EU but as close friends of Turkey and Europe."
He also addressed a range of foreign policy issues, including U.S. backing of a two-state solution to the Israeli-Palestinian conflict: "The United States strongly supports the goal of two states, Israel and Palestine, living side by side in peace and security. That is a goal shared by Palestinians, Israelis, and people of good will around the world."
Chief Palestinian peace negotiator Saeb Erekat said he welcomed Mr. Obama's commitment to the two-state solution, and Israeli Prime Minister Benjamin Netanyahu's office said Israel was committed to reaching peace and would cooperate with the Obama administration to achieve that goal, Reuters reported.
Mr. Obama's comments on Turkey's battle against Kurdish separatists known as the PKK also drew applause from the lawmakers. "There is no excuse for terror against any nation. As president, and as a NATO ally, I pledge that you will have our support against the terrorist activities of the PKK," he said.
The PKK issue has been a source of tension between Turkey and Iraq, which has a large Kurdish population in the northern part of the country that Turkey says is being used as a staging area for attacks on its soldiers across the border.
"These efforts will be strengthened by the continued work to build ties of cooperation between Turkey, the Iraqi government, and Iraq's Kurdish leaders, and by your continued efforts to promote education and opportunity for Turkey's Kurds," said President Obama.
In general, the president spoke of Turkey as a "critical ally" and called the country "an important part of Europe."
Connecting Turkey with Europe was a critical reminder for the country, which is grappling with media freedom and gender equity issues in light of its efforts to achieve a series of reforms required for its accession to the EU, said Soner Cagaptay, director of the Turkish Research Program at the Washington Institute for Near East Policy.
President Obama's comments portrayed Turkey as a Muslim country and a part of the Western world, and showed that the two needn't be exclusive, Cagaptay said.
The president's visit also underscored Turkey's strategic location, bordering Iran, Iraq and Syria, and the country's importance on an international level, including its regular participation in NATO operations, he said.
At a news conference with Turkish President Abdullah Gul earlier in the trip, President Obama touched on the issue of alleged genocide committed by Turks against Armenians during World War I. Obama urged Turks and Armenians to continue a process "that works through the past in a way that is honest, open and constructive," but stopped short of calling the killings of Armenians in the early 20th century genocide, according to the Associated Press.
Gul said many Turkish Muslims were killed during the same period. Historians, not politicians, Gul continued, should decide how to label the events of those times.
Before his visit to Turkey, President Obama had attended the Group of 20 economic summit in London, NATO's 60th anniversary celebration in France and Germany, and a meeting of EU leaders in Prague in the Czech Republic on Saturday.