The announcement came just days after the Taliban attended peace talks in the United Arab Emirates with US officials. Representatives from the UAE, Saudi Arabia, and Pakistan were also present. However, Taliban leaders refused to meet with an official delegation from Afghanistan.
Shamkhani's remarks were printed by Tasnim, an outlet considered close to Iran's military. It isn't clear when or where the talks were held, but they were first reported after Shamkhani noted them in a meeting with government officials in Kabul on Wednesday.
Shamkhani also spoke to the threat of Daesh's presence in Afghanistan, which is limited but considered a threat nonetheless, underscoring the need for regional allies to combat the "ominous plot sponsored by the US and regional reactionaries."
The national security adviser to Afghanistan's president, Hamdullah Mohib, reportedly praised Iran as a pillar of stability and security in the region during the meeting. Iran and Afghanistan share a 600-mile-long border.
Iran has traditionally worked against the Sunni Taliban and supported Shiite minorities in Afghanistan who were being persecuted by its regime.
Some US and Afghan officials have tried to blame Iran in recent years for supporting the Taliban, but no hard evidence has supported the charge.
The United States has struggled to take territory from the group, which has gained significant ground in 2018 despite an unprecedented US bombing campaign.
According to the neoconservative Council on Foreign Relations, the Taliban controlled 90 percent of Afghanistan in 2001, prior to the US invasion. After 17 years, the Taliban still contests some 50 percent of the country and controls an additional 13 percent, according to the Foundation for Defense of Democracies, another neoconservative think tank in Washington.
"The presence of American forces was from the very start, in principle, a wrong and illogical move and a primary cause of instability and insecurity in the region," Bahram Ghasemi, a spokesman for Pakistan's Foreign Ministry, reportedly said on Saturday. Pakistani Foreign Minister Shah Mehmood Qureshi was also in Tehran on Monday for talks, although details are sparse.
In November, Russia hosted talks between the Taliban and the Afghanistan High Peace Council — a body that does not represent the Afghan government but oversees peace efforts in the country. That was the first such peace negotiations in which that the militant group has participated. US General John W. Nicholson, who is retiring as the top US military official in Afghanistan, earlier this year blamed Moscow for supporting and even arming the Taliban, but Moscow rejected the charge and no evidence was offered to support it.
During the talks in both the UAE and Russia, Taliban leaders refused to negotiate with Kabul, agreeing only to work with the American officials backing them on the peace process.
Last week, US Department of Defense officials reportedly confirmed that US President Donald Trump ordered the withdrawal of 7,000 US soldiers from the country, just shy of half of the 14,000-strong uniformed US presence in Afghanistan.