"I like Obama because he is half-Muslim and everybody here hated Bush because of what he did in Iraq," said Kassim, a Turkish driver, as he sped past the ornate Ottoman palace on the Bosphorus where Barack Obama is due to speak today.
Mr Obama has already gone a long way towards restoring Turkey to its former position as a crucial American ally in the region. Relations soured after the Turks refused to join the US-led invasion of Iraq in 2003.
Yesterday, in a speech to the Turkish parliament, Mr Obama reached out to Turkey as an ally and to the rest of the Muslim world with the assurance that the US "is not and will never be at war with Islam".
Kassim had already decided that it did not matter what Mr Obama's religion was. What mattered was that many of his policies "seem to show that he wants the same things that we do". This attitude is a radical change from a few years ago when an opinion poll showed only 9 per cent of Turks had a favourable opinion of the US.
In his address to the Ankara parliament before travelling on to Istanbul, Mr Obama also called on the EU to admit Turkey as a member. France has strongly opposed its inclusion and enthusiasm for EU entry has fallen among Turks. Nevertheless the long-term aim of joining is important in making Turkey less autocratic and reducing the role of the Turkish army in taking crucial decisions.
Mr Obama danced around contentious issues such as the 1915 Armenian genocide and the rights of Turkey's Kurdish minority. "My views are on the record and I have not changed those views," he said during a press conference with President Abdullah Gul, referring to his pledge during the US presidential election campaign to describe the killing of Armenians during the First World War as genocide.
The word Mr Obama did not use yesterday was "genocide" and he went on to praise Turkey for moving towards an accord with Armenia and a reopening of the border which has been closed since Armenia's war with Azerbaijan in 1993.
Mr Obama showed similar delicacy in referring to Turkish Kurds, praising signs of greater official tolerance towards them such as a Kurdish-language TV channel. But he then swiftly denounced the PKK Kurdish guerrillas, against whom the Turkish army has fought a long war, as "terrorists."
Turkish leaders were surprised that Mr Obama, who had shown little interest in Turkey previously, should have chosen to visit their country at the end of his European tour.
The decisive factor was probably Turkey's geographical position, since it has common borders with Iraq, Iran, Syria and Georgia. About 70 per cent of US supplies to Iraq go through Turkish ports or airspace, or travel via Turkish roads. With the American military's supply routes to Afghanistan through Pakistan increasingly under threat, the use of Turkish airspace and airbases is again important.
The Turkish Prime Minister, Recep Tayyip Erdogan, had already shown his eagerness to get along with the incoming US administration by withdrawing Turkey's veto of the appointment of the Danish Prime Minister, Anders Fogh Rasmussen, as Nato's secretary general.
Turkey objected to his appointment because of his failure to apologise for the cartoons of the Prophet Mohamed published in a Danish magazine in 2005. Mr Rasmussen has since promised to be more sensitive to Muslim sensibilities, a promise which, since Turkey has the largest army in Nato after the US, he will probably have to keep.
Mr Obama went through the ritual yesterday of visiting the tomb of Mustafa Kemal Ataturk, the founder of the Turkish secular state, while today he will visit Hagia Sophia, the great Byzantine church in Istanbul and the nearby Blue Mosque, as well as speaking at a UN-sponsored conference on reducing religious and ethnic divisions.
Mr Erdogan's Justice and Development Party (AKP) is clearly revelling in Mr Obama's praise of Turkey and of the AKP's cautiously progressive and Islamic policies. No other Turkish party is a serious political rival to the AKP, which won power in 2002. It lost some ground in municipal elections on 29 March but this setback was largely in terms of its inflated expectations.
The army's ability to manipulate the state from behind the scenes has not disappeared but is not as strong as it was. And although the international financial crisis is having an effect on the Turkish economy it has not yet had a devastating impact.
One of George Bush's key failures when he invaded Iraq was not persuading Turkey to allow him to base an American invasion force in the country. Over the proceeding five years, Turkey increasingly pursued friendlier policies towards Iran, Russia, Sudan and Hamas.
The Turks are now delighted to discover that their policies are very similar to those adopted by Mr Obama.