KABUL, Afghanistan — Taliban fighters were holding 21 hostages Monday after seizing them from three buses in northern Afghanistan, according to a local government official.

Esmatullah Muradi, a spokesman for the governor of Kunduz, told NBC News that more than 160 passengers aboard the vehicles were initially captured. They included women and children, he said.

The buses were travelling through Kunduz to Takhar province and were packed with people returning to their home villages to celebrate the Muslim holiday of Eid al-Adha. The area of Kunduz had recently fallen under Taliban control.

Nasrat Rahimi, a spokesman for Afghanistan's Interior Ministry, told NBC News that most of the passengers were later freed by government forces. Muradi said 21 people remained in the hands of the militants. However, the Taliban said it had chosen to release the vast majority of the hostages. It was not possible to confirm either account.

The bolded area shows the location of Afghanistan's Takhar province. Google Maps

"We deployed our people to different places of the main highway and started searching all vehicles passing through the road to capture Afghan army and policemen," a Taliban commander told NBC News on condition of anonymity because he is not authorized to speak to the media.

The incident came a day after U.S.-backed President Ashraf Ghani called for a temporary cease-fire with the Taliban to coincide with the holiday.

President Donald Trump’s impatience with the 17-year-old war in has prompted U.S. diplomats and commanders to kick-start negotiations with the Taliban, including holding direct talks with the militants.

Afghan President Ashraf Ghani. Mohammad Ismail / Reuters file

Trump reluctantly approved the deployment of several thousand additional American troops to Afghanistan last year, but remains skeptical about keeping the 15,000-strong force in place.

Ghani has been trying to nudge the resurgent Taliban, which has been fighting to overthrow the U.S.-backed government in Kabul since 2001, into peace talks. The Taliban has not officially responded to Ghani's offer.

On Sunday, Ghani said "the cease-fire should be observed from both sides, and its continuation and duration also depend on the Taliban's stand."

Ghani made the announcement just a day after the leader of the Afghan Taliban said that there will be no peace in the country as long as the "foreign occupation" continues.

In June, the government announced another truce with the Taliban during the Eid al-Fitr holiday in June, which the Taliban accepted. The group later rejected a call by the president to extend it.

Ahmed Mengli reported from Kabul, Afghanistan. Mushtaq Yusufzai reported from Peshawar, Pakistan. F. Brinley Bruton reported from London.