Iranian President Mahmoud Ahmadinejad criticized Washington with his own words, as he appeared at a news conference alongside Afghan President Hamid Karzai in Kabul.
Earlier this week, visiting U.S. Defense Secretary Robert Gates accused Tehran of playing a "double game" in Afghanistan – being friendly to the Afghan government, while at the same time trying to undermine Afghan and international forces.
Iran denies the allegations, and Mr. Ahmadinejad struck back.
He says that in his view, U.S. officials are the ones playing a double game. He said they created terrorism in Afghanistan and then declared a need to fight it.
The United States supported Afghan rebels more than two decades ago when the Soviet Union fought in Afghanistan. But the support vanished after the Soviets pulled out, and eventually, analysts say instability in Afghanistan created a safe haven for al-Qaida.
While touring an Afghan army training center outside Kabul, U.S. Defense Secretary Robert Gates expressed his concern about the Iranian leader's visit.
"As I told President Karzai, we think Afghanistan should have good relations with all of its neighbors, but we also want all of Afghanistan's neighbors to play an upfront game in dealing with Afghanistan," said Gates.
President Karzai told reporters that relations between Tehran and Kabul are deep and comprehensive.
He says Afghanistan wants good relations with all its neighbors. He says his country does not want to be used as a launching pad for an attack elsewhere in the region, and it does not want its neighbors to fight with others inside its borders.
The president of Kabul's state-sponsored Regional Studies Center of Afghanistan, Abdul Ghafoor Liwal, tells VOA he believes Iranian officials like the fact that U.S. resources currently are tied down in Afghanistan.
"They never talk clearly about the United States leaving from Afghanistan. But they always, they want to fight inside Afghanistan with the United States," said Liwal.
Daoud Sultanzoy is a member of the Afghan Parliament. While he agrees with Liwal's assessment, he tells VOA the Afghan government should embrace Iran with open arms and a watchful eye.
"We should take advantage of those similarities in historic and cultural and linguistic terms. But these similarities should not be for subjugation or domination by Iran," says Sultanzoy.
Earlier, an Afghan presidential spokesman said Mr. Karzai and Mr. Ahmadinejad planned to discuss joint projects, such as building a railway linking Iran and Tajikistan through Afghanistan.
Mr. Ahmadinejad had planned to visit Afghanistan Monday, which ended up being the same day the U.S. defense secretary arrived unannounced in the country. The Iranian president's visit was postponed for unspecified reasons.