Turkish Prime Minister Recep Tayyip Erdogan on thursday expressed his support of Iran's nuclear ambitions. In a statement issued by Ahmadinejad's office, Erdogan was quoted as saying: "The government and nation of Turkey has always clearly supported the nuclear positions of the Islamic republic of Iran, and will continue to firmly follow the same policy in the future."
Ahmadinejad thanked Turkey for its "clear and frank" stance on the issue, the statement added.
The exchange occurred on the last day of a two-day visit Erdogan was making to Iran to discuss the nuclear issue and bilateral ties.
The Turkish prime minister was to hold talks later Thursday with Iran's supreme leader, Ayatollah Ali Khamenei, before flying home.
Iran on Wednesday announced that long-stalled talks with world powers on its nuclear programme would be held on 13 April at a place yet to be agreed. Tehran says it prefers Istanbul as the venue.
The talks carry hopes of defusing a tense international showdown over Iran's nuclear activities that has sent oil prices soaring.
Israel has brandished the threat of possible military action against Iran's nuclear sites, while the United States has put its energies into sanctions and diplomacy but has not ruled out the military option.
Erdogan flew into Iran on Wednesday from South Korea, where he attended a nuclear security summit alongside other leaders, including US President Barack Obama.
Obama told the summit that "time is short" for a diplomatic solution to the standoff with Iran and urged Iran's leaders to engage in the talks with a "sense of urgency."
The United States and its Western allies believe Iran is working towards a nuclear weapons capability. Tehran denies that, saying its atomic programme is exclusively peaceful.
The last round of Iran/P5+1 talks was held in Istanbul in January 2011 and ended in failure. The round before that, in late 2010, was in Geneva.
Erdogan on Wednesday slammed the bellicose language being directed against Iran, saying: "Military threats against a country that seeks to master peaceful nuclear technology are not acceptable."
Turkey relies on Iran for 30 per cent of its oil imports, and has refused to go along with sanctions imposed by the United States and Europe, saying it will observe only UN-mandated restrictions on Iran.
However, Turkey is also a NATO member, and it has agreed to deploy parts of an anti-missile shield that could be used against Iran, a point that has generated friction in the past with its neighbour.