BEIRUT, Lebanon — Islamic State fighters appeared close to retaking Palmyra, Syria, on Saturday, just nine months after Syrian government forces drove them from the desert city, where they had terrorized residents and blown up irreplaceable ancient monuments.

Residents said Islamic State militants were battling soldiers in the city’s center, after retaking outlying oil fields and nearly encircling the city over the past week as the government and its allies were focused on a pivotal battle in Aleppo, further north.

Losing Palmyra for a second time would be a major symbolic and military blow for the Syrian government, which touted its reconquest of the city in March, after 10 months of Islamic State rule.

Russia, the government’s main ally, which had helped with air support and advisers, flew an orchestra to play a victory concert in Palmyra’s ancient amphitheater that month.