The renewed diplomatic efforts come as Washington seeks a way out of the 17-year conflict
Iran has met with the Afghan Taliban, a top Iranian security official said Wednesday according to the Tasnim news agency, just days after the militants attended reconciliation talks in the UAE.
Ali Shamkhani, secretary of Iran's Supreme National Security Council, made the announcement while on a visit to the Afghan capital Kabul, several Iranian agencies reported.
"The Afghan government has been informed of the communications and talks carried out with the Taliban, and this process will continue," he said, quoted by Tasnim.
No details on where the talks took place were given by the news agency, which is considered close to Iran's Revolutionary Guards.
"The Islamic Republic has always been one of the primary pillars of stability in the region and cooperation between the two countries will certainly help in fixing Afghanistan's security issues of today," Shamkhani said.
Abas Aslani, a reporter for Tasnim, tweeted that it was the first time talks had been confirmed between Iran and the Taliban.
The announcement follows reconciliation talks last week between the United States and Taliban officials in the United Arab Emirates.
The Taliban said they also held meetings with officials from the UAE, Pakistan and Saudi Arabia, but the militants refused to meet a delegation from Afghanistan.
The renewed diplomatic efforts come as Washington seeks a way out of the 17-year conflict.
An American official told AFP last week that President Donald Trump had decided to pull out "roughly half" of the 14,000 US forces, but the White House has yet to confirm the widely-publicised move.
Iran and Afghanistan share a nearly 600-mile border, and have a complex relationship in recent years.
Tehran has long supported its co-religionists in Afghanistan, the Shia Hazara minority, who were violently persecuted by the Taliban during its rule in the 1990s.
Iran worked alongside the United States and Western powers to help drive out the Taliban after the US-led invasion in 2001.
But there have been allegations, from Western and Afghan sources, that Iran's Revolutionary Guards have in recent years established ties with the Taliban aimed at driving out US forces from Afghanistan.
Iran hosted Pakistani Foreign Minister Shah Mehmood Qureshi on Monday in Tehran. No details were given of the discussions.
Tehran welcomed Trump's announcement that he was withdrawing all US forces from Syria last week, but has not commented on the reduction in Afghanistan.
"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," foreign ministry spokesman Bahram Ghasemi said on Saturday.
Hawks in Washington have criticised Trump's move, saying it will cede significant influence in the region to Iran.
The Taliban, meanwhile, has made significant territorial gains this year as its fighters inflict record casualties on government forces.
Afghanistan's largest militant group carried out an hours-long gun and bomb attack on a Kabul government compound on Monday that killed at least 43 people, one of the deadliest assaults on the capital this year.