Iraqi security forces battling Islamic State militants freed Friday the city of Rawa near the Iraqi border with Syria, defeating the extremist militants from their last urban stronghold in Iraq, the Iraqi military said.

The troops and the paramilitary local tribal fighters fully liberated the city of Rawa and raised the Iraqi flag on some of its buildings, Lt. Gen. Abdul Amir Yarallah, the commander of the offensive, said in a brief statement.

At dawn, the Iraqi forces pushed into Rawa from three directions and liberated four neighborhoods in the western part of the city, Yarallah said in a earlier statement.

On November 5, Iraqi Prime Minister Haider al-Abadi raised the Iraqi flag on Husaibah border crossing with Syria two days after the Iraqi forces recaptured it and the nearby city of al-Qaim from the extremist militants.

The troops will continue to clear the villages in the vast rural areas in the north of the Euphrates River as well as the desert between the provinces of Anbar and neighboring Salahudin.

On Oct. 26, the security forces started a major offensive to free the last urban IS stronghold in Iraq near the Iraqi-Syrian border.

The IS militants seized large swathes of territory in Iraq in 2014. After three years of battles, the Iraqi forces have retaken most of the occupied areas from the terrorist group, including the country’s second largest city Mosul.