Islamic State retook Palmyra in a surprise advance in December, after having been driven out eight months before, Reuters said.
Read alsoRussia orders over 20,000 medals for participants of Syria war"With backing from the Syrian and Russian air forces, units of our armed forces recaptured the city of Palmyra, in cooperation with the allies," the military said in a statement.
The army and Iranian-backed militia advanced inside Palmyra on Thursday as Islamic State withdrew completely, the Syrian Observatory for Human Rights, a Britain-based war monitor, said.
Islamic State militants retreated to areas in the east, the Observatory reported. Government forces took control of swathes of Palmyra and conducted combing operations to clear mines on Thursday, it said.
Read alsoIslamic State militants 'destroy Palmyra statues'During Islamic State's first occupation which ended in March, the ultra-hardline jihadist group destroyed some of Palmyra's priceless archaeological heritage and is believed to have razed other parts of the historical ruins since regaining control in December.
Islamic State is on the back foot in Syria after losing territory in the north to an alliance of U.S.-backed, Kurdish-led militias, and to Turkey-backed Syrian rebels.
The Syrian army is also fighting Islamic State in the area east of Aleppo, where it is pushing to reach the Euphrates river, and in the city of Deir al-Zor, where it controls an enclave that is besieged by the jihadist group.