Ghasemi said the two sides discussed "security issues aimed at driving the peace process in Afghanistan." The Afghan government was aware of the visit, he said, adding that Iran is trying to find out if it can be "helpful" to peace in Afghanistan.
The talks were not the first between the Taliban and Iranian officials. Ali Shamkhani of Iran's Supreme National Security Council confirmed last week in Kabul that such talks have taken place in the past and would continue. Ghasemi said Iran has tried to facilitate talks between the insurgents and government of Afghanistan.
The developments come against a backdrop of near-daily attacks in Afghanistan, where the Taliban hold sway over nearly half the country. The Taliban have recently held talks with representatives of several regional countries amid U.S. plans to withdraw up to half the 14,000 American troops from Afghanistan.
Two weeks ago, the Taliban held another round of talks with U.S. officials, this time in the United Arab Emirates and also involving Saudi, Pakistani and Emirati representatives.
In 1998, Iran held the Taliban responsible for the deaths of nine Iranian diplomats who were working in its consulate in northern Afghanistan and sent reinforcements to the 950-kilometer- (580-mile-) long border that Iran and Afghanistan share.