WASHINGTON (AP) — President Donald Trump said he spoke Tuesday with the leader of the Taliban, days after the United States and the Taliban signed an agreement that calls for the withdrawal of American troops from Afghanistan after more than 18 years.

Trump is believed to be the first U.S. president to speak directly to the Taliban, and he suggested it wasn't his first time. Asked if Tuesday was his first conversation with a leader of the Taliban, Trump said: “I don't want to say that.”

“The relationship is very good that I have with the mullah,” Trump said. “We had a good long conversation today and, you know, they want to cease the violence. They'd like to cease violence also.”

"They're looking to get this ended and we're looking to get it ended,” he told reporters. “I think we all have a very common interest.”

The deal, signed by chief negotiators from the two sides and witnessed by Secretary of State Mike Pompeo, could see the withdrawal of all American and allied forces within 14 months and allow Trump to keep a key campaign pledge to extract the U.S. from “endless wars.” But it also could unravel easily, particularly if the Taliban and other factions of Afghan society fail to have successful talks about a political way ahead for the country.

Those talks are scheduled to begin next Tuesday.

Trump said it's still unclear what the Afghans will do when they sit with the Taliban and attempt to draft a peaceful political future for the nation. He added: “The country really has to get it ended. We've been there for 20 years. Other presidents have tried and they were unsuccessful.”

A short time before Trump spoke, Taliban spokesman Zabiullah Mujahid tweeted that the president had spoken on the phone with Taliban leader Mullah Abdul Ghani Baradar.

The Afghan Taliban also released a statement, saying the phone call took place shortly after 9:30 a.m. EST and lasted for 35 minutes. SITE Intelligence Group, which monitors communications from militant organizations, said the Taliban statement claimed the call was held in the presence of a number of members of the Taliban negotiating committee and Zalmay Khalilzad, the U.S. envoy who negotiated the deal.

According to the statement, the conversation was about how both sides will put in place the agreement and that the mullah assured Trump that if the United States honored the agreement, then the U.S. and the Taliban will have “positive bilateral relations.”

The statement said that Taliban leader told Trump: "Mr. President! Take determined actions in regards to the withdrawal of foreign forces from Afghanistan and do not allow anyone to take actions that violate the terms of the agreement thus embroiling you even further in this prolonged war."

No other details were disclosed.

There is a photo of President Ronald Reagan hosting five “Afghan freedom fighters” in the Oval Office in 1983 to discuss Soviet aggression, but they were not members of the Taliban, which did not form until the 1990s. The U.S. backed the Afghan fighters against the Soviets.