A March 29 photo shows damages to the historical city of Palmyra, Syria. On Saturday, Islamic State (IS) fighters re-entered Palmyra after the Syrian government forces gained control over the Unesco World Heritage site in March.. (Str/EPA)

Islamic State militants fought their way back into the ancient Syrian city of Palmyra on Saturday nine months after they were driven out by Syrian government forces, in a reminder that the group is still a force to be reckoned with despite major losses of territory elsewhere.

The advance into Palmyra seemed set to reverse a year of steady defeats for Islamic State fighters and came three days after a big offensive launched from three directions in the surrounding desert.

Palmyra is the site of an ancient Roman complex of temples that is considered one of the world’s archaeological treasures, and work had recently begun on restoring some of the many ruins that were blown up during the Islamic State’s 10-month occupation of the city.

It is also the one place where Russian military intervention had made a significant difference in the fight against the Islamic State. Russian airstrikes facilitated the Syrian government’s recapture of Palmyra in March, and in May the Russian military escorted a planeload of journalists on a victory tour of the city, complete with a performance by a Russian orchestra.

Syrian activists and human rights monitors said Islamic State fighters entered the city itself late afternoon Saturday after government defenses collapsed. A Syrian activist from Palmyra who uses the name Khaled al-Homsi said that by late evening, the militants controlled most of the city. Islamic State fighters were detaining young men and looting stores of weapons, he said.

The offensive was aided by 200 Islamic State fighters who had made their way to the area from the Iraqi city of Mosul, according to the Britain-based Syrian Observatory for Human Rights.

With street fighting continuing, it remained unclear whether the militants would be able fully to recapture the city. Russia Today quoted a Syrian military official as saying the Syrian government still has forces inside Palmyra and has not fully lost control, despite what the official described as “fierce clashes.” The Islamic State has demonstrated a pattern in the past of launching spectacular attacks that catch its enemies unaware, only to be driven back once the defendants regroup.

If the militants were to fully regain control of Palmyra, it would represent a startling reversal of 18 months of setbacks and suggest that the outright defeat of the group may still be a long way off. The Islamic State has not made any significant advances in either Syria or Iraq since it captured Palmyra and the Iraqi city of Ramadi in May 2015, and it has meanwhile lost vast swaths of territory in both countries, including Palmyra and Ramadi.

The Palmyra advance coincides with a major U.S.-backed offensive by the Iraqi army for Mosul, where hopes for a swift victory are fading as the militants put up a stiff fight. They also still control large portions of Syria, including much of the vast eastern desert where Palmyra is located.

The U.S. military announced Saturday that it was sending an additional 200 Special Operations troops to northern Syria to help the mostly Kurdish force that is battling the militants there.

The assault on Palmyra also comes as a further reminder that the Syrian army, despite substantial gains against rebel forces in recent weeks, is thinly spread, suffering from shortages of manpower and weary after more than five years of war.

The rebel-held eastern portion of Aleppo seems poised to be recaptured soon by government troops, which are being aided by Iranian advisers, Shiite militias from Iraq, Afghanistan and Lebanon, and Russian airstrikes. The government has also been making less-publicized advances against anti-government rebels around the capital, Damascus.

But in a pattern that has become typical throughout Syria’s five-year war, gains on one front have meant drawing down troops on another, leaving government positions exposed.

The militants had sliced through government lines in recent days, capturing some of Syria’s most important gas fields and sending government soldiers running for their lives. One video posted Friday by the Islamic State showed about a dozen Syrian soldiers fleeing through the desert as militants fired on them with heavy machine guns. Another posted Saturday showed them overrunning Syrian government sniper positions in the desert outside the city, kicking at the dead bodies of Syrian soldiers and sifting through the tents they had been living in.

Zakaria Zakaria in Istanbul and Louisa Loveluck in Beirut contributed to this report.