US President Donald Trump paid a surprise visit to Afghanistan to spend Thanksgiving for the first time in that country with the American troops present there and assured those deployed that the Taliban have been engaged in talks.

“The Taliban wants to make a deal,” Trump told troops at the Bagram Air Base, where he also met Afghan President Ashraf Ghani.

The visit follows a prisoner swap with the Taliban aimed at resuming peace negotiations. Trump also said that the US was “substantially” reducing troop.

During the meeting at the military airbase some 50 km north of here, both sides underscored that “if the Taliban are sincere in their commitment to reaching a peace deal, they must accept a ceasefire”, Xinhua news agency reported.

After the meeting, the two presidents joined the US troops in offering Thanksgiving greetings. “We thanked them and their Afghan counterparts for their continued efforts and sacrifices in combating terrorism,” Ghani said.

In August, peace talks between Washington and the Taliban had to reach a deal on the withdrawal of thousands of American troops collapsed after President Trump cited an attack that killed a US soldier as his reason for pulling out of negotiations. The talks did not include the Afghan government.

The Taliban had never agreed to end their violent campaign against Afghan and foreign forces while negotiations were taking place. Sixteen US troops have been killed this year.

In 2001, US-led forces overthrew the Taliban government in Afghanistan because the militants had given safe haven to the Al-Qaeda network to plan the attacks on the US on September 11.

According to the statistics from the UN Assistance Mission in Afghanistan, 2018 was the deadliest year on record for the Afghan conflict, with a total of 10,993 civilian casualties, including 3,804 civilian deaths.

(With inputs from agency)