“Turkey is trying to become a major player in the region, which means it has to rebalance its relationship with the U.S.,” said Ozgur Unluhisarcikli, director of the Ankara office of the German Marshall Fund of the United States. “In the case of Iran, Turkey does not want a U.S. or Israeli strike. It does not want sanctions. Turkey knows that sanctions did not work against Saddam Hussein’s Iraq during the 1990s.”

Turkey had another reason in trying to pull off this diplomatic gamble. It is now one of the rotating members of the U.N. Security Council, along with Brazil. It does not have a veto. But it will have to accept the new sanctions, oppose them or simply abstain next month when the sanctions are put to a vote. “Turkey does not want to be pushed into taking sides,” Mr. Unluhisarcikli said. “It could abstain, saying it tried to find a diplomatic solution.”

That is one of the reasons President Barack Obama spent more than an hour last week talking by telephone to Prime Minister Recep Tayyip Erdogan about Ankara’s diplomatic initiative. Turkey is a NATO member and an E.U. candidate, and Washington cannot afford to dismiss Ankara’s foreign policy ambitions.

Mr. Erdogan and his new foreign minister, Ahmet Davutoglu, are spearheading this policy. If they succeed, it will mean prestige and respect for a mostly Muslim, Western-oriented country that is determined to bring stability to a volatile region on Turkey’s borders.

So far, the policy has had mixed results. Take Armenia, with whom Turkey cut all diplomatic relations in 1993 and closed the border. Two years ago, as part of Ankara’s zero-problems strategy, Turkish and Armenian diplomats held secret talks culminating in direct negotiations between their presidents. In August, the countries agreed to normalize relations in what was hailed as a major breakthrough for promoting stability in the Caucasus.