KABUL — After months of delays, the Afghan government will release the last group of high-value Taliban prisoners, President Ashraf Ghani announced Sunday, removing the final hurdle to the start of direct talks with the militants.

The move comes after intense U.S. pressure on the Afghan government to abide by preconditions to the talks outlined in the U.S.-Taliban peace deal. That agreement called for those talks to begin in March, but preliminary negotiations repeatedly hit snags. The Afghan government was not party to the peace deal between the United States and the Taliban, and objected to some of its terms.

Without direct negotiations between the Taliban and the Afghan government, the peace deal the United States signed with the Taliban could collapse. Violence has escalated since the deal was signed, and U.S. forces have repeatedly been pulled back into the conflict to defend government forces with air support.

Secretary of State Mike Pompeo issued a blunt statement Thursday calling for the release of the prisoners and warning that U.S. assistance could hinge on how peace talks progress.

“We acknowledge that the release of these prisoners is unpopular. But this difficult action will lead to an important result,” he said in a statement. Pompeo previously threatened to cut U.S. assistance over delays to the start of the talks.

The U.S.-Taliban deal called for the Afghan government to release 5,000 Taliban prisoners in exchange for the Taliban’s release of 1,000 members of Afghanistan’s security forces. The Taliban released 1,000 prisoners, but the Afghan government initially refused to release 400 Taliban prisoners linked to high-profile attacks that killed scores of civilians.

Instead, Ghani called for a traditional council of elders, known as a loya jirga, to advise the government’s decision. The council began meeting on Friday and their decision was announced Sunday.

“To remove obstacles for the start of peace negotiations, end bloodshed, and observe the interests and good of the people, the jirga approves the release of 400 Taliban prisoners,” the council said Sunday. It also called for a long-term cease-fire with the Taliban.

Abdullah Abdullah, a former presidential candidate and now head of reconciliation efforts, said once the prisoners are released, talks with the Taliban probably will begin within days.

Ghani announced that he would sign an order to release the prisoners Sunday. Now “the choice is in the Taliban’s hands,” he said. “The Taliban should show today they don’t fear a nationwide cease-fire.”

Zalmay Khalilzad, the Trump administration’s special envoy for Afghanistan, tweeted late Sunday: “A historic opportunity for peace is now possible.” Khalilzad said that after the prisoner release is complete “in the next few days,” the Afghan negotiating team would travel to Doha for “the immediate start” of negotiations with the Taliban.

“The parties will embark on a process to reach an agreement on a political roadmap & a permanent and comprehensive ceasefire to end the Afghan war,” Khalilzad tweeted.

U.S. and Afghan officials have been pushing for a reduction in violence for months since the U.S.-Taliban deal was signed. The Taliban announced and upheld two brief cease-fires in recent months to mark Muslim holidays, but violence nationwide remains high.

Peace talks with the Taliban are expected to begin as soon as this week in Qatar. The country held months of negotiations between the Taliban and the United States.

Despite the repeated delays to the Afghan-Taliban talks, President Trump and the Pentagon have announced plans to further draw down U.S. forces in the country ahead of the U.S. presidential election in November. Defense Secretary Mark T. Esper told Fox News on Saturday that U.S. troop levels in Afghanistan would drop below 5,000 by the end of November.

Under the U.S.-Taliban deal, U.S. troop levels were initially to be cut to 8,600 and any further reductions would be based on the Taliban’s adherence to conditions. Those conditions include the start of peace talks with the Afghan government and a pledge to prevent terrorist groups aiming to attack the West from operating inside Afghanistan.

The talks have not begun, and the United Nations has said the Taliban maintains links to al-Qaeda, the group responsible for the attacks of Sept. 11, 2001, on the United States. Khalilzad, the special envoy for Afghanistan, has said the Taliban has made some progress breaking with terrorist groups, but “they have to take a lot more steps.”

Sharif Hassan in Kabul contributed to this report.