Washington (AFP) - The US military plans to stay in Syria as long as necessary to ensure the Islamic State group does not return, a Pentagon official told AFP on Tuesday.

"We are going to maintain our commitment on the ground as long as we need to, to support our partners and prevent the return of terrorist groups," Pentagon spokesman Eric Pahon said.

The United States currently has approximately 2,000 troops on the ground in Syria, where they have been helping train and advise partner forces in the fight against IS.

Now that the jihadists have been cleared from all but a few pockets of territory, the United States has been assessing what its presence will be going forward in the civil-war-torn nation.

Pahon said its troop commitment in Syria would be "conditions-based," meaning that no timeline will determine if and when the US will pull out.

"To ensure an enduring defeat of ISIS, the coalition must ensure it cannot regenerate, reclaim lost ground, or plot external attacks," he said.

"This is essential to the protection of our homeland as well as to defend our allies and partners.... The United States will sustain a 'conditions-based' military presence in Syria to combat the threat of a terrorist-led insurgency, prevent the resurgence of ISIS, and to stabilize liberated areas."

The announcement is likely to rile Russia, which since late 2015 has conducted a separate military campaign to prop up the regime of President Bashar al-Assad.