The US should learn the lesson of Iraq, President Bashar al-Assad said on Thursday, threatening to expel American troops from Syria and retake areas from its Kurdish allies.

In the interview with RT, the Russian state's international broadcaster, Assad raised the prospect of conflict with US forces if they do not leave Syria.

He vowed to recover territory where American troops have deployed, either through negotiations with Washington's Syrian allies or by force.

Assad, who is backed by Russia and Iran, appears militarily unassailable in the war that has killed an estimated half a million people, uprooted around 6 million people in the country, and driven another 5 million abroad as refugees.

Russian President Vladimir Putin (L) shakes hands with his Syrian counterpart Bashar al-Assad during their meeting in Sochi on May 17 Credit: AFP

After recovering much of the rebels' onetime strongholds, Assad now controls the biggest part of Syria. But tracts remain outside his control.

That includes large parts of the north and east where US special forces deployed during the fight against Islamic State of Iraq and the Levant (Isil), supporting the Kurdish-dominated Syrian Democratic Forces (SDF).

Assad said the government had "started now opening doors for negotiations" with the SDF, whose main component, the Kurdish YPG, has mostly avoided conflict with Damascus in the war.

"This is the first option. If not, we're going to resort to ... liberating those areas by force. We don't have any other options, with the Americans or without the Americans," he said.

Rojda Felat, a Syrian Democratic Forces (SDF) commander, waves her group's flag at the iconic Al-Naim square in Raqqa Credit: AFP

"The Americans should leave, somehow they're going to leave. "They came to Iraq with no legal basis, and look what happened to them. They have to learn the lesson. Iraq is no exception, and Syria is no exception. People will not accept foreigners in this region anymore," he said.

The US-led invasion of Iraq that toppled Saddam Hussein in 2003 was followed by an insurgency that lasted years.

People walk near a portrait of Syrian President Bashar al-Assad hanging in a street in the Syrian capital Damascus Credit: AFP

US Defense Secretary Jim Mattis said on April 30 the United States and its allies would not want to pull troops out of Syria before diplomats win the peace.

Story continues

Kurdish groups, which are supported by the US, currently control around a third of the country. having taken huge swathes of territory from Isil.

The Kurdish have been fighting for autonomy from the Syrian regime, hoping to create their own state in the north.

Assad has said on numerous occasions that he plans to reclaim "every inch" of Syria.