Iranian president Mahmoud Ahmadinejad arrived in Afghanistan today for a visit, after US secretary of defence Robert Gates said he was wary of Tehran's influence in the country.
With careful timing that Mr Gates described as "clearly fodder for all conspiratorialists", Mr Ahmadinejad arrived in Kabul just before Mr Gates departed at the end of his own three-day visit.
Mr Ahmadinejad said Afghanistan will only achieve security through the establishment of a strong government and not through the presence of foreign troops.
"The solution to insecurity in Afghanistan is not military presence," Mr Ahmadinejad said at a press conference with Afghan president Hamid Karzai in Kabul. The solution is "establishing a strong Afghan government and the taking over of security responsibilities," he said.
Earlier this week, Mr Gates accused Tehran of playing a "double game" in Afghanistan, professing support for Mr Karzai's government while trying to undermine the US-led military effort that protects it.
Speaking to reporters before leaving today, Mr Gates said he had told Mr 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,” he said.
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 US troops are fighting.
The Afghan insurgency is mainly led by Sunni Islamists, who are long sworn enemies of Shia 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.