QUNEITRA, Syria — Syrian officials on Friday celebrated the recapture of this symbolic southern town near the Israeli-occupied Golan Heights, raising a flag and playing the national anthem to mark the victory over the armed groups that controlled it for more than four years.

A picture of President Bashar Assad was hoisted on a partially destroyed monument in central Quneitra, where his father had raised the Syrian flag after Israel withdrew more than four decades ago.

Friday’s ceremony was attended by hundreds of flag-waving people from nearby villages, who sang the anthem, danced and cheered the Syrian army and affiliated militias.

Quneitra was abandoned after Israel destroyed it as it withdrew in 1974 following the Mideast war, although Israel continued to occupy the adjacent Golan Heights, seized in 1967. A cease-fire and a disengagement agreement have largely held along the demarcation lines for four decades.

During Syria’s civil war, armed groups captured the town and large parts of southwestern Syria, forcing a U.N. peacekeeping force there to evacuate.

The celebrations in Quneitra took place as Syrian soldiers finalized their deployment to restore their positions along the demarcation line for the first time since 2014.

The soldiers also deployed to a crossing that connects Quneitra to the Golan. Even though the countries are at war, families from the local Druze community divided by the demarcation line use the crossing to exchange visits.

A field commander said it was only a matter of time before the U.N. peacekeeping force is redeployed and civilians can once again use the crossing.

With Syrian forces regaining control of the town and crossing, only a handful of villages in Quneitra province remain outside of government control, said the Syrian Observatory for Human Rights, a Britain-based monitoring group.

The Syrian government had left the destruction in Quneitra as a reminder of the war with Israel.

The government offensive in southwestern Syria began June 19. Since then, pro-government forces seized most of the areas in Daraa and Quneitra provinces along the border with Jordan and the Golan. They now are battling remnants of the Islamic State group at the southern tip of the region.

“I came to celebrate victory,” said Marwan Ahmed Abdullah, a 49-year-old Syrian whose four sons fought in the war, including one who was killed. “What matters is for peace and security to return to Syria like before.”

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.