BEIRUT (Reuters) - The Syrian military has cleared Islamic State from its last pocket of territory in central Syria after months of fighting, a Syrian military source said on Friday.

The enclave east of the Syrian city of Homs had lain close to the main road running between the cities of Homs and Aleppo near the town of al-Salamiya.

“The armed forces completed military operations in the eastern Homs countryside, eliminating the last groups of the terrorist Islamic State in the area and liberating an area of 1,800 square kilometers,” the military source said.

Islamic State has lost swathes of Syrian territory to separate campaigns being waged by Syria’s army, supported by Russian forces and Iran-backed militias, and by the U.S.-backed Syrian Democratic Forces (SDF), which is dominated by the Kurdish YPG militia.

Government forces and their allies are trying to oust Islamic State from its remaining Syrian positions in the eastern province of Deir al-Zor.

Last month the Syrian army’s advance to Deir al-Zor city lifted a three-year-long siege imposed by Islamic State on a government-held enclave there.

On Friday Syrian forces reached the edge of Islamic State’s current main base in Syria, al-Mayadin, which lies around 45 km (28 miles) to the south of Deir al-Zor city.