The US and the Taliban have reached an “understanding” that could lead to “a significant and nationwide reduction in violence across Afghanistan” — and ultimately, end America’s oldest war, Secretary of State Mike Pompeo announced Friday.

A seven-day reduction of violence period will begin Friday night — and if it is successful, US and Taliban officials will sign the long-sought-after peace agreement Feb. 29 in Doha, Qatar, a senior State Department official told the Associated Press.

The two parties have been engaged in “extensive talks” intended to “facilitate a political settlement to end the war in Afghanistan, reduce United States and Allied Forces presence, and ensure that no terrorist group ever uses Afghan soil to threaten the United States or our allies,” Pompeo said in a statement.

“Intra-Afghan negotiations” will begin soon after the Feb. 29 signing, “and will build on this fundamental step to deliver a comprehensive and permanent ceasefire and the future political roadmap for Afghanistan,” Pompeo’s statement says.

“The only way to achieve a sustainable peace in Afghanistan is for Afghans to come together and agree on the way forward,” the Secretary of State said.

The Taliban issued its own statement on the deal Friday.

“Both parties will now create a suitable security situation in advance of agreement signing date, extend invitations to senior representatives of numerous countries and organizations to participate in the signing ceremony, make arrangements for the release of prisoners, structure a path for intra-Afghan negotiations with various political parties of the country and finally lay the groundwork for peace across the country with the withdrawal of all foreign forces,” the Taliban said.

The war began October 2001, and if the peace deal is signed, it would mark an important step for President Trump toward meeting his 2016 campaign pledge to withdraw American troops from Afghanistan.

But if it fails, the president could run the risk of being labeled by his Democratic rivals as naive and willing to sacrifice the security of U.S. soldiers and interests to advance himself politically.

With Post wires