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 residents 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. Farmers also sent their apples over the frontier.

A field commander, speaking on condition of anonymity in line with regulations, 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.

Signs of the latest conflict also can be seen. On the drive to Quneitra, reporters crossed a large sand barrier, apparently erected by the armed opposition to separate the areas they controlled. Just past it, a fresh layer of dirt filled what appeared to be a large trench dug by the insurgents for fortification.

A village a few kilometers from Quneitra also was destroyed, apparently in recent fighting.

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, which continues to hold territory at the southern tip of the region.

The U.N. said the fighting has displaced 182,600 people who are currently in need of humanitarian assistance, including in Sweida, the province adjacent to Daraa and Quneitra. Initially around 300,000 were estimated to have fled their homes, but many have returned after fighting subsided in some areas and surrender deals were reached with armed opposition in others.

Before the fighting, some 55,000 people had lived in the area now controlled by an IS-affiliated group. But several thousand have managed to flee and it is not clear how many remain, the U.N. said, raising concerns that the group may be restricting the movement of others still living under its grip.

U.N. humanitarian chief Mark Lowcock told the Security Council that humanitarian aid needs to be urgently scaled up across the southwest, particularly in Quneitra.

"An estimated 110,000 newly displaced people remain in Quneitra governorate, in areas that have largely been cut off from sustained humanitarian assistance," Lowcock said.

Back in Quneitra, Marwan Ahmed Abdullah, a 49-year-old Syrian whose four sons fought in the war, including one who was killed said he came to "celebrate victory."

"We'll sacrifice our souls for Syria. What matters is for peace and security to return to Syria like before."

Mohammed Khaba, 50, said he came from the village of Khan Arnabah to celebrate the victory.

"It is a source of pride for every Syrian. It is proof that we are able to expunge terrorism from all over the country," he said. The Syrian government considers all opposition fighters to be terrorists.

For Omar Ayoub, it was a long-awaited homecoming. The 40-year-old had not been to Quneitra since 2012, when it became engulfed in the civil war.

Dressed in the traditional garb of the ethnic minority Circassians, Ayoub said he was "ecstatic" to return to the capital of his native hometown.

Originally from the Golan Heights, Ayoub has been living in Damascus since his family was displaced by the war with Israel. He repeatedly returned to the area, which is home to Circassians as well as the minority Druze community, until rebels seized it.

"I am ecstatic to raise the flag, and God willing, through Quneitra, we'll regain all occupied lands. I am certain."


Associated Press writer Edith Lederer contributed to this report from the U.N.