Terrorist group Islamic State in Iraq and Syria (ISIS) is on the verge of losing all of the land it once controlled in Iraq and Syria, according to Acting Defense Secretary Pat Shanahan.

“If we wind the clock back two years, I’d say 99.5%-plus of the ISIS-controlled territory has been returned to the Syrians,” Shanahan said at a press briefing on Tuesday.

“Within a couple of weeks, it will be 100%,” he said.

Shanahan characterized ISIS as decimated but not “defeated.”

“ISIS is no longer able to govern in Syria. ISIS no longer has freedom to mass forces. Syria’s no longer a safe haven. We’ve eliminated the majority of their leadership. We’ve significantly diminished their financial capabilities,” he said.

“When you look at their — used to be much vaunted social media — it’s been decimated, and if you look at the activity online, there’s a lot of confusion. They no longer hold key territory, and they no longer control significant population centers,” he added.

“The risk of terrorism and mass migration has been significantly mitigated,” he said.

President Trump in December announced that the U.S. would pull its troops out of Syria, but has since said the U.S. would not leave right away, and that some troops might stay.

Former Defense Secretary Jim Mattis signed a troop withdrawal order in late December, but so far only equipment has been withdrawn.

Shanahan said the withdrawal was still in the “early stages.”

“We are on a deliberate, coordinated, disciplined withdrawal,” he said.

One difficulty for the Trump administration has been trying to prevent a conflict between U.S.-ally Turkey and the U.S.’s local partners on the ground against ISIS, the Kurdish Syrian Democratic Force (SDF).

Turkey considers the SDF as affiliated with the PKK, a Kurdish terrorist group inside Turkey, and has threatened to launch an offensive against the SDF in northern Syria, along the southern border of Turkey.

Trump has proposed a safe zone in northern Syria, that could ensure that the SDF remain protected. However, details on who would administer the safe zone are scant.

Shanahan said there are lots of conversations between militaries and diplomats among partners of the U.S.-led anti-ISIS coalition.

“There are very important dialogues going on in major capitals in Europe about support to that portion of Syria, as well as some very important discussions with our SDF counterparts there in Northeastern Syria,” he said.

“The discussions hold real promise. I would underscore the real part. Obviously lots of contentious issues, but the people that are working them, i have high confidence in,” he added.

“The phase that this moves to, is how you sustain local security. That’s where the support of the coalition, that’s where these partnerships are so critical. You have long term eradicating extremism — hopefully in my lifetime we’ll be able to say that we’ve achieve that result.”