In a speech to the world's Muslims from Cairo on Thursday, President Barack Obama said that the US does not seek to stay in Iraq or Afghanistan.
"We will... relentlessly confront violent extremists," Obama said.
"Because we reject the same thing that people of all faiths reject: the killing of innocent men, women, and children. And it is my first duty as president to protect the American people."
"Make no mistake: we do not want to keep our troops in Afghanistan," the US president said. "We seek no military bases there."
"Unlike Afghanistan, Iraq was a war of choice that provoked strong differences in my country and around the world," Obama said, repeating the US government's promise to withdraw troops from the country by 2012.
In the earlier part of his speech, Obama said, "I have come here to seek a new beginning between the United States and Muslims around the world; one based upon mutual interest and mutual respect; and one based upon the truth that America and Islam are not exclusive."
Obama said he was aware that "no single speech can eradicate years of mistrust," but said he was "convinced that in order to move forward, we must say openly the things we hold in our hearts."
The US president said that though he was a Christian, he was born of a family with generations of Muslims, that had he spent years hearing the Muslim call to prayer as a boy in Indonesia.