ANKARA - U.S. President Barack Obama told the Muslim world on Monday the United States was not at war with Islam, using his first international tour to try to repair America's damaged image abroad.

Obama hammered home his support for the creation of a Palestinian state, despite the recent election of a right-leaning government in Israel, in an effort to show he was serious about reaching out to Muslims.

Let me say this as clearly as I can: The United States is not, and will never be, at war with Islam, he said in a wide-ranging speech to Turkey's parliament.

In his first trip as president to the Muslim world, which had accused his predecessor George W. Bush of bias in favor of Israel, Obama said: The United States strongly supports the goal of two states, Israel and Palestine, living side by side in peace and security.

Chief Palestinian peace negotiator Saeb Erekat welcomed Obama's words, saying he had made a major commitment to the two-state solution. 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.

Obama is on the last leg of his first overseas trip as president. He is trying to rebuild ties with Muslims after anger at the invasion of Iraq and war in Afghanistan, made more urgent by a resurgent al Qaeda and Taliban insurgency in Afghanistan.

Our partnership with the Muslim world is critical in rolling back a fringe ideology that people of all faiths reject, Obama said.

But I also want to be clear that America's relationship with the Muslim world cannot and will not be based on opposition to al Qaeda. Far from it. We seek broad engagement based upon mutual interests and mutual respect. We will listen carefully, bridge misunderstanding, and seek common ground.

Obama's visit is a nod to Turkey's regional reach, economic power, diplomatic contacts and status as a secular democracy seeking European Union membership that has accommodated political Islam.

Given Turkish activity and credibility in the wider region stretching from Afghanistan to the Middle East, passing over energy transit routes, Obama wants to give new blood to a real strategic partnership with Turkey, said Cengiz Candar, a leading Turkish commentator and Middle East expert.

ARMENIA BREAKTHROUGH?

NATO member Turkey is a transit route for U.S. troops and equipment going to Iraq as well as Afghanistan. As Washington reduces its troops in Iraq, Incirlik air base is expected to play a key role and Obama discussed this with Turkish leaders.

Obama urged the foreign ministers of Turkey and Armenia during a meeting later on Monday to complete talks aimed at restoring ties between the two neighbors, a U.S. official said.

Ankara and Yerevan are engaged in talks to end nearly a century of hostility, including reopening the border -- a move which could help shore up stability in the volatile Caucasus.

Touching on a highly sensitive subject, Obama told reporters he stood by his views on mass killings of Armenians by Ottoman Turks in 1915, which he has termed genocide, but said he expected a breakthrough in talks between Turkey and Armenia.

I want to be as encouraging as possible around those negotiations which are moving forward and could bear fruit very quickly, very soon, so as a consequence what I want to do is not focus on my views right now, Obama said, trying to strike a balance over the issue while adding to pressure on the talks.

Turkey accepts that many Christian Armenians were killed by Ottoman Turks during World War One but denies that up to 1.5 million died as a result of systematic genocide.

MUSLIM AMERICANS

The U.S.-Turkish relationship suffered in 2003 when Ankara opposed the invasion of Iraq and refused to let U.S. troops deploy on its territory. Turkey has also criticized Washington for allowing Kurdish separatists to be based in northern Iraq.

Obama drew on his personal background to emphasize his conciliatory message to Muslims.

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, Obama said in his speech to parliament.

Obama also said he sought engagement with Iran, but added: Iran's leaders must choose whether they will try to build a weapon or build a better future for their people.

Obama offered to improve cooperation in the fight against PKK separatist rebels and backed Turkey's troubled EU bid.

Turkey's greatness lies in your ability to be at the center of things. This is not where East and West divide, it is where they come together, Obama said.