BEIRUT (Reuters) - Islamic State fighters holding a small district in Damascus have gained some ground after driving out Syrian army units that moved into a neighboring area that rebels abandoned last week, a war monitor said.

In fighting that lasted 24 hours, the ultra-hardline militant group killed 36 Syrian soldiers, the British-based Syrian Observatory for Human Rights said. The Syrian army could not immediately be reached for comment.

The district of al-Qadam lies in the Syrian capital’s southern suburbs and has not been part of the month-long offensive waged by the army against rebels in eastern Ghouta.

It is located next to the Yarmouk Palestinian refugee camp, a scene of fierce fighting early in the seven-year conflict.

Last week, rebels that had held part of Qadam for years quit the district for opposition areas in northern Syria under an evacuation deal with the government, allowing the army to move in.

However, the Islamic State group that had held a separate part of Qadam, and had sporadically fought the rebels there, launched an assault to take the area they had vacated.

Islamic State has lost almost all its territory in Syria after two rival offensives last year by the Syrian army, backed by Russia and Iran, and an alliance of Kurdish and Arab militias backed by the United States.

It now controls only the small pocket in Qadam, a patch of territory in southwest Syria near the borders with Jordan and Israel, and two small areas of desert on each side of the Euphrates near the border with Iraq.