American and Taliban negotiators are meeting in Doha Wednesday following a conditional decision from President Trump to sign a peace deal with the militants, according to officials.

One U.S. official and an Afghan official briefed on the matter said Trump gave his conditional approval to sign a peace agreement if the insurgents can demonstrate their commitment to reducing violence in Afghanistan.

“Trump has endorsed the deal and said it must be signed,” the Afghan official said, explaining that when Secretary of State Mike Pompeo called Afghan leaders Tuesday, he said the peace talks “deadlock” had been broken.

Both officials spoke on condition of anonymity as they were not authorized to speak to the media.

For months, U.S. negotiators have demanded a reduction in violence from the Taliban before formal talks could resume. Taliban negotiators presented a violence reduction proposal in January that would have ceased attacks in cities and highways. But it was unclear how long it would last and if it would apply to the Afghan military as well as U.S. military personnel.

After weeks of back and forth, U.S. and Taliban negotiators have reached an agreement on how exactly violence will be reduced and for how long, according to the Afghan official. People knowledgeable about the negotiations said the reduction would probably be seven to 10 days.

The State Department, in a statement late Tuesday, said “U.S. talks with the Taliban in Doha continue around the specifics of a reduction in violence.”

Pompeo told Afghan President Ashraf Ghani and Chief Executive Abdullah in separate phone calls Tuesday that “notable progress” had been made in the peace talks, the Afghan leaders later said on Twitter.

Afghan officials have previously said a nationwide ceasefire is a precondition to talks with the Taliban, but both Ghani and Abdullah expressed optimism about a potential “reduction in violence.” Abdulllah said the “progress in current talks could lead to an agreement that would pave the way for intra-Afghan talks leading to a durable peace.”

The temporary reduction in violence, which an Afghan official said is tentatively to be announced by Pompeo and Ghani after a meeting this weekend in Munich, is intended as an expression of good faith on the part of the Taliban. Assuming the designated period is successfully completed, a more formal U.S.-Taliban agreement is to be signed within days. The agreement would include the start of direct talks between the Taliban and the Afghan government next month, and the beginning of a U.S. troop withdrawal.

One person knowledgeable about the negotiations cautioned that it remains unclear what the status of any signed U.S.-Taliban agreement would be if violence resumed after the agreed reduction period, or if promised talks between the militants and the Afghan government did not succeed or even begin. This person spoke on the condition of anonymity about the closed-door negotiations.

In September, U.S. negotiator Zalmay Khalilzad announced that a tentative deal had been reached with the Taliban. Trump then said he planned to bring Taliban leaders to Camp David to sign it, but he called off the meeting — which the Taliban later said it had not agreed to — as well as further talks, after the militants took credit for an attack in Kabul that killed an American soldier.

The draft agreed to at the time included Taliban cooperation in fighting against terrorist groups in Afghanistan, such as the Islamic State, as well as U.S. withdrawal and inter-Afghan talks, with a nationwide cease-fire at the top of the agenda. Trump announced in November that the talks had restarted, but progress was reported to be limited until recently.

Khalilzad met with Ghani in Kabul on Saturday to brief him on recent discussions with the militants and meetings with Pakistani officials, Ghani’s office said.

“We are waiting for a clear answer from the Taliban for a cease-fire or lasting reduction in violence based on a working mechanism which is acceptable to the people of Afghanistan and the U.S. government,” his office said.

In last week’s State of the Union address, Trump said that “the determination and valor of our warfighters has allowed us to make tremendous progress,” although U.S. government reports have indicated that the number of Taliban attacks during the last quarter of 2019 were the highest in nearly a decade.

But Trump, who has promised to stop the country’s “endless wars,” said that “peace talks are now underway” and “we are working to finally end America’s longest war and bring our troops back home.”

Tentative terms for a new U.S.-Taliban agreement are said to be nearly identical to the one in September. It was unclear, however, whether any initial withdrawal would reduce the U.S. force from about 12,000 to the 8,600 already planned without any deal or even lower.

The composition of an Afghan government negotiating team — one of the sticking points of the earlier agreement — also remains uncertain. Afghan officials announced in December that Ghani had won reelection with just over 50 percent in a nationwide September vote, avoiding a second round of voting.

But Abdullah, his estranged governing partner and main opponent, challenged the results.

George reported from Islamabad. Sayed Salahuddin and Sharif Hassan in Kabul contributed to this report.