Washington: US State Department spokesman Ned Price on Tuesday (local time) said the two Americans detained in Afghanistan had been freed by the Taliban as part of an apparent 'goodwill gesture'.

"This was not part of any swap of prisoners or detainees. There was no money that exchanged hands," said Price.

Price welcomed the release of the prisoners on Tuesday but declined to identify them, citing respect for their privacy.

"We are providing these two US nationals with all appropriate assistance," Price said.

The two prisoners arrived in Qatar on Tuesday before being reunited with their families, said officials, who spoke anonymously to discuss a sensitive matter, reported Washington Post.

The Taliban's release of the Americans came as it announced suspension of university education for all female students in Afghanistan, seen as the latest crackdown on the rights of women in the country.

Price condemned the Taliban's restrictions, saying the Afghan government "should expect that this decision which is in contravention to the commitments they have made repeatedly and publicly to their own people, will carry costs".

Price declined to speculate on whether the release of the prisoners was done to lessen the anger of US and Western governments regarding the clampdown on the rights of women and girls in the country, reported Washington Post.

The United States has repeatedly condemned the Taliban's track record since the militants swept back to power last year when President Joe Biden pulled out US troops, leading the two-decade-old Western-backed government to collapse.