He campaigned to round up votes in the U.N. Security Council for official recognition of Palestine as a full U.N. member state, a move the U.S. was trying desperately to block. As American diplomats buttonholed officials at the U.N. last month to urge them to vote no, Turkish officials were meeting with some of the same countries nearby to pressure them to do the opposite.
Erdogan made it known that in his meeting with Obama, he told the president that Obama's signature peacemaking initiative had failed, and pointedly read to the president portions of the 2010 speech in which Obama had declared there would be a Palestinian state within a year.
Turkey's booming 9% growth rate has been a source of its growing influence, and the government has worked hard to preserve it, though it has led to regular collisions with neighbors and world powers. Turkey has taken advantage of the economic weakness of such neighbors as Iraq and Syria, and has opened trade with Eastern neighbors including Iran.
In recent days, Turkey's claims over disputed oil and gas fields in the Mediterranean have led to a flare-up with Washington, as well as with Cyprus, Israel and Greece, which are among several countries with claims on energy deposits in the sea.
Turkey has demanded that Cyprus halt plans to have a U.S. energy company drill for gas in waters claimed by Cyprus. Turkey said the drilling threatened a U.N. effort to reunify Cyprus, which is divided between ethnic Greek and Turkish enclaves, and Ankara has sent warships into the zone.
Administration officials, led by Secretary of State Hillary Rodham Clinton, have rushed to the defense of the U.S. firm, Noble Energy, that is to conduct the drilling, and have told the Turks that they view the Turkish move as a threat to American business interests.
Cyprus has also been a source of conflict with the European Union. Erdogan said Turkey would break off talks on accession to the union if Cyprus was given the rotating presidency, as is planned.
Turkey has been caught between its desires to remain a member in good standing of the North Atlantic Treaty Organization and to strengthen its economic and political ties to Iran.
It balked for months at NATO's request to accept a defense radar on its territory for a system aimed at blocking the missile threat from Iran. Last month it agreed to accept a U.S.-built site, to the delight of U.S. officials.
But that came only after NATO officials made it clear, said one alliance official, that "if we didn't put it there, we'd just put it in another country nearby." Turkish officials continue to publicly insist that data from the radar won't be provided to Israel — though U.S. officials say it will.
U.S. officials praise Turkey's cooperation in helping organize a new order in Libya with the ouster of Moammar Kadafi's government. But Turkey initially fought proposals for NATO intervention, in part because of worries about Turkey's $15-billion investment in Kadafi's state, and the 25,000 Turks then working there.
Turkey has become outspoken in its opposition to Syrian President Bashar Assad's violent crackdown on antigovernment demonstrators, after begging Obama in July to delay calling for Assad to step down.
But though Erdogan has denounced Assad's crackdown as "savage," he has tried to avoid disrupting Turkey's valuable trade and investment ties to Syria. Turkey is expected to soon impose a round of economic sanctions on Syria, but analysts predict they won't go as far as the White House would prefer.
U.S. officials say they stay in close touch with Turkey, in part to avoid surprises. Last year, for example, Pentagon officials were alarmed to learn that Turkey had conducted military exercises with China, with no advance notice, raising questions about its plans with NATO.
There is consensus among Western diplomats and regional specialists about the value of Obama's efforts to help expand Turkey's regional role and anchor it to the West, especially at a time when Turkey's chances for joining the European Union appear to have faded. Yet the ties may be somewhat short of the "model partnership" that Obama and Erdogan refer to.
Henri Barkey, a Turkey expert and former State Department official, says that although U.S. officials have gotten some of the commitments they most wanted from Turkey this year, others, such as restoration of its former strong relationship with Israel, may be out of reach.
"They won't convince Turkey not to lead an anti-Israel bloc in the Middle East," said Barkey, now with Lehigh University. "Not going to happen."