Iranian President Mahmoud Ahmadinejad arrived on Wednesday for a visit to Afghanistan, after U.S. Secretary of Defense Robert Gates said he was wary of Tehran's influence in the country.
With careful timing that Gates described as "clearly fodder for all conspiratorialists", Ahmadinejad arrived in Kabul just before Gates departed at the end of his own three-day visit.
Earlier this week, Gates accused Tehran of playing a "double game" in Afghanistan, professing support for President Hamid Karzai's government while trying to undermine the U.S.-led military effort that protects it.
Speaking to reporters before departing on Wednesday, Gates said he had told Karzai Washington wanted Kabul to have "good relations with all of its neighbours".
"But we also want all of Afghanistan's neighbours to play an up front game dealing with the government of Afghanistan."
Washington, which will have 100,000 troops in Afghanistan by the end of the year, says it believes Iran provides some support for militants there, although not nearly on the same scale as in Iraq, another Iranian neighbour where U.S. troops are fighting.
The Afghan insurgency is mainly led by Sunni Islamists, who are long sworn enemies of Shi'ite Iran.
Iran has wide and growing influence in Afghanistan, especially in the west of the country where it has important economic ties.
Millions of Afghans were refugees in Iran during three decades of war, and a dialect of Iran's Farsi language is one of the two state languages in Afghanistan.
Tehran blames Western military intervention in Afghanistan for causing instability. Iran was the only major regional country to reject an invitation to an international conference on Afghanistan in London in January.
However, despite their suspicions, Western countries have praised Tehran's efforts in combating the drug trade. Iran has a serious heroin addiction problem, while Afghanistan produces nearly all the world's opium used to make the drug.
Karzai is due to fly to Pakistan later on Wednesday, meeting the leadership of another big neighbour.