President Donald Trump has announced the U.S. is talking to the Taliban and claimed they are eager to make a deal, less than three months after he suddenly called off official negotiations.

“The Taliban wants to make a deal, and we’re meeting with them,” the president said during an unannounced trip to Afghanistan on Thursday to visit American troops for Thanksgiving.

“We’re saying it has to be a cease-fire, they didn’t want to do a ceasefire, but now they do want to do a ceasefire, I believe," he added, offering scant details on the talks.

It was unclear in what capacity the negotiations were taking place, and whether they amounted to official negotiations or back-channel meetings.

He did not elaborate on when the talks re-started and it was unclear if low-level contact between U.S. officials and the militant group had ever stopped. It was also not immediately clear if the terms of the talks had changed.

State Department officials were not immediately available for comment on the president's statements.

Asked by reporters during a meeting with Afghan President Ashraf Ghani whether talks with the Taliban had restarted Trump said "yes.”

"Hopefully they will be successful and lead to Afghan-to-Afghan dialogue in the near future," added Joint Chiefs of Staff Chairman Gen. Mark Milley.

Two Taliban leaders and members of their leadership council told NBC News Friday that official negotiations had not yet resumed, but said they had agreed to restart talks with Americans.

“We were holding a series of unofficial meetings with U.S. officials in Doha last week. And in those meetings, they told us that U.S. leadership is willing to resume the peace process and President Trump himself would announce it,” said one senior Taliban leader based in Afghanistan, who is privy to developments in Qatar but spoke on the condition of anonymity because he was not authorized to speak to the press.

“We are willing to resume the peace process with U.S. But we had certain conditions and that we shared with U.S. leadership in our recent meetings in Doha,” the commander added without specifying what those conditions were or whether they had been met.

NBC News could not confirm the group’s claims and it is known to have misinformed media in the past.

America's 18-year-war in Afghanistan is the longest in the country's history, but violence has plagued Afghans for decades.

Ghani took to Twitter Thursday saying both the U.S. and Afghanistan agreed that “if the Taliban are sincere in their commitment to reaching a peace deal, they must accept a cease-fire.”

The Taliban has repeatedly refused to agree to a cease-fire and the two Taliban leaders said they had rejected the demand once again, contradicting Trump’s assessment that he believed they wanted one. In the past, the Taliban has also refused to officially sit down with or recognize the Western-backed government in Kabul, referring to Ghani as an American puppet.

Milley said Wednesday that talks between the Afghan government and the Taliban were "ongoing" but he did not specify whether they were official talks.

Afghan alleged former Taliban fighters carry their weapons before handing them over as part of a government peace and reconciliation process. Noorullah Shirzada / AFP/Getty Images file

Trump previously called off U.S.-Taliban negotiations on Sept. 7, ending a near yearlong effort to broker a deal with the militant group. The proposed agreement made “in principle” had hinged on a phased withdrawal of U.S. troops from the country, in exchange for the Taliban agreeing to enter peace talks with the Afghan government and pledging not to allow areas under its control to be used as a launching pad for terrorist groups including al Qaeda.

The U.S. military currently has approximately 13,000 troops in the war-torn state. It has had boots on the ground since 2001, when American forces toppled the Taliban regime for harboring Osama bin Laden the architect behind the Sept. 11 attacks.

But American troops are already leaving the country. Last month the top U.S. general in Afghanistan said the total number of troops in the country had decreased by around 2,000.

"We're bringing down the number of troops substantially," Trump said during his visit Thursday.

Ending wars like the one in Afghanistan was one of Trump's chief campaign promises in 2016. Since 2001, around 2,400 Americans have been killed supporting the war effort in Afghanistan, according to the department of defense. Between Jan. 2009, when the United Nations began a systematic documentation of civilian casualties, and Sept. 2019, some 34,000 civilians died as a result of the armed conflict.

NBC News reported in August that Trump has made clear to his advisers that he wants to pull all U.S. troops out of Afghanistan by the 2020 election, according to five current and former administration and military officials. His announcement Thursday comes as some of Trump’s other foreign policy initiatives, including curbing Iran's and North Korea’s nuclear ambitions have hit substantial roadblocks.