KABUL (Reuters) – The top U.S. general said on Wednesday that the chances of a successful outcome from peace talks on ending the 18-year war in Afghanistan were higher than before and could happen in the “near term.”

Earlier this month the Afghan Taliban released American and Australian university professors held hostage for more than three years, raising hopes for a revival of peace talks.

The chances of successful peace talks are complicated by the Taliban's refusal to engage with what they call an “illegitimate” U.S.-backed government in Kabul.

A messy political situation in Afghanistan and continued violence only make the situation more difficult.

Army General Mark Milley, the chairman of the Joint Chiefs of Staff, arrived in Afghanistan on Wednesday, his first trip to the country since taking the top job in September.

“I think the chances of a positive outcome through negotiations is higher than I have seen, and I've been deeply involved in Afghanistan for 18 years,” Milley told reporters.

“With a bit of luck, we'll have successful negotiations in the near term, not too distant future,” Milley said.

He added that work remained to actually see a positive outcome.

“A lot of time in situations like this, two steps forward one step back,” he said.

Over the past 18 years, senior American military leaders and diplomats have routinely talked about their optimism and how the war has turned a corner, but the Taliban continue to control large parts of the country.

Talks between the Taliban and the United States aimed at ending the war collapsed in September after President Donald Trump called off what he described as a planned meeting at the U.S. Camp David presidential retreat.

Before the talks were broken off, both sides had said they were close to a deal.

Two Taliban leaders told Reuters that the group had again been holding meetings with senior U.S. officials in Doha since this weekend, saying they could soon resume the peace process.

“Our leaders started unofficial meetings with senior U.S. officials in Doha and working on a plan how to resume the peace process,” one of the Taliban leaders said.

Milley said negotiations were “ongoing.”

Last month the U.S. military said that it had quietly reduced the number of troops by about 2,000, to bring the total number of U.S. troops in Afghanistan to between 12,000 and 13,000.

The Pentagon has said it can go down to 8,600 troops and still carry out a counter-terrorism mission.

Milley said no decisions had been made on troop reductions and there were several options, including going down to 8,600.