From Yinanc's column, entitled "Turkey Opts for Ahmadinejad":
While EU foreign ministers expressed serious concerns and called for an inquiry into the election, Turkish President Abdullah Gül and Prime Minister Recep Tayyip Erdoğan did not wait long to congratulate Iranian President Mahmoud Ahmadinejad, who claimed victory in his country’s recent polls. Both Turkish leaders called Ahmadinejad separately on Sunday, as his rivals were challenging the election results.
This apparently stems from the fact that:
First, prior to the Iranian elections, Ankara predicted a victory for Ahmadinejad over his rival Mir Hossein Mousavi; and
Second, although there have been irregularities, the prevailing view holds that allegations of serious fraud to the point of stealing the elections from Mousavi, as his supporters claim, are exaggerated.
Although Western countries had hopes that the advent of a moderate leader might have opened the way for reconciliation, some Turkish decision-makers are of the view that Ahmadinejad’s victory is not bad news. To the contrary, officials familiar with Iran believe that normalization of relations between Iran and the West can be achieved more easily with Ahmadinejad than Mousavi.
"Had Mousavi come to the government, his job would have been very difficult. The conservative, anti-American mullahs would have tied his hands and made it very tough for him to engage in dialogue with the United States," said one official, who asked to remain anonymous. The same official reminded me that the main supporters of Mousavi, who formed the camp of moderates for former presidents Hashimi Rafsancani and Mohammad Khatami, ruled the country in the past, but failed to bring about change, adding, "Those who thought that Mousavi would have changed Iran’s nuclear policy are mistaken."Ahmadinejad, on the other hand, has strengthened his hand after the election, which will make it easier for him to challenge the radical clerics in case he needs to. It is no secret that Ahmadinejad has the backing of radical clerics, including the country’s supreme leader, Ayatollah Khamanei. But he is less radical, and more open to reconciliation and dialogue, than his supporters, some Turkish experts say.....As far as Turkish-Iranian relations are concerned, the Turkish government seems content to have Ahmadinejad at the head of the Iranian government. Ahmedinejad is said to enjoy excellent relations with both President Gül and Prime Minister Erdoğan. In fact, he is known to be an admirer of Erdoğan, especially of his style - perhaps even more so after Erdoğan walked off the stage during a meeting in Davos at which he had a harsh exchange of words with Israeli President Shimon Peres. But personal issues aside, Turkish officials believe the two countries enjoyed good relations during Ahmadinejad’s first term in office.
You can read the full column here.
If Yinanc's column accurately reflects the thinking in Ankara on Iran, Ahmadinejad and the recent elections there, I think Turkey could find itself on the wrong side of this developing story. Some clarification about Ankara's position is definitely in order.