KABUL (Reuters) - The Taliban said on Wednesday it was close to an agreement with U.S. officials on a deal that would see U.S. forces withdraw from Afghanistan in exchange for a Taliban promise that the country would not become a haven for international militants.

Slideshow ( 2 images )

Negotiations over how to end the 18-year war in Afghanistan have been held in Doha, capital of Qatar, since late last year. The ninth round of talks began last week.

“We hope to have good news soon for our Muslim, independence-seeking nation,” said Suhail Shaheen, a spokesman for the Taliban’s political office in Doha.

U.S. officials engaged in talks with the Taliban in Doha were not immediately available for comment.

Two sources with knowledge of the negotiations said the U.S. special representative for Afghanistan, Zalmay Khalilzad, who has been leading the talks, is scheduled to be in Kabul to brief President Ashraf Ghani about the agreement.

A senior security official in Kabul said the Taliban and U.S. officials had agreed on a timeline of about 14 to 24 months for the withdrawal of the U.S. forces.

Details would be shared with the Afghan government before they were made public, the official said.

Ghani, who is seeking a second term in September, has repeatedly offered to hold direct talks with the Taliban, but the group demanded a complete withdrawal of foreign forces as a precondition to start negotiations.

The Taliban now controls more territory than it has since 2001, when the United States invaded following the 9/11 attacks, and the war has ground to a stalemate, with casualties rising among civilians as well as combatants.

Sediq Sediqqi, a spokesman for Ghani, said the government did not want U.S. forces to stay in Afghanistan over the long term, but added that their “conditions-based” presence was needed at this stage.

“We want to end the bloodshed. We cannot accept the orders of the Taliban. They must accept our demands and we demand peace,” said Sediqqi.

Some 14,000 U.S. troops remain in Afghanistan, training and advising Afghan forces and conducting counter-insurgency operations. NATO also has a mission in the country totalling 17,000 to provide support to the Afghan forces.