The United States and the Taliban have secured a seven-day reduction in violence in Afghanistan, Pentagon chief Mark Esper said, raising hopes for a peace agreement to end the 18-year-old war.

"We've said all along that the best, if not the only, solution in Afghanistan is a political agreement. Progress has been made on that front and we'll have more to report on that soon, I hope," Esper told reporters in Brussels on Thursday, dubbing his meetings with NATO colleagues "productive".

More:

Esper did not say when the partial truce would begin but President Donald Trump on Thursday said a peace agreement was "very close".

"I think we're very close," Trump said on a podcast broadcast on iHeart Radio when asked if a tentative deal had been reached. "I think there's a good chance that we'll have a deal ... We're going to know over the next two weeks."

Trump's comments are the latest indication of significant progress in negotiations that the US and the Taliban have been holding since December in the Qatari capital, Doha.

The Pentagon chief said if the process goes forward there would be continuous evaluation of any violence.

"It is our view that seven days, for now, is sufficient but in all things, our approach to this process will be conditions-based, I will say it again, conditions-based," he said.

The US and the Taliban have been locked in gruelling talks that have stretched over more than a year, as the Trump administration seeks an end to the US's longest conflict.

Tens of thousands of people have been killed in an armed rebellion launched by the Taliban after it was deposed from power in 2001.

Earlier, US Secretary of State Mike Pompeo said the talks had achieved "a pretty important breakthrough".

Sources say the partial truce could lead to the signing of a US-Taliban peace deal that would see the US pull thousands of troops from Afghanistan, in return the Taliban would provide various security guarantees and launch eventual talks with the Kabul government.

There are about 13,000 US troops as well as thousands of other NATO personnel in Afghanistan, 18 years after a US-led coalition invaded the country following the September 11, 2001 attacks on the US.

The news of a potential agreement comes amid continued attacks by the Taliban, who controls about 40 percent of Afghanistan, according to Afghan defence officials.

Last month the Special Inspector General for Afghanistan Reconstruction, a US government agency, assessed that there had been a record-high number of attacks by the Taliban and other anti-government forces in the last three months of 2019.