BEIRUT — Parallel offensives waged by Turkey and the Syrian government on two separate towns in Syria on Monday pushed residents into overcrowded shelters for safety as others tried to flee the advancing forces by road.

Residents and displaced families in the besieged town of Douma in the rebel-held Damascus suburbs of eastern Ghouta were sleeping in shops and in the streets as basements in the town filled up beyond capacity, said Haitham Bakkar, a local resident.

“We are afraid of the assault,” Bakkar said of the government’s efforts to take the town amid a ferocious campaign of shelling and airstrikes. Blasts could be heard as he spoke to The Associated Press via a messaging service.

Meanwhile, thousands of people were fleeing the northwestern town of Afrin as Turkish troops and Turkey-backed opposition fighters moved closer to completely encircling it.

Ebrahim Ebrahim, a Europe-based spokesman for the largest Kurdish group in Syria, the Democratic Union Party, or PYD, said those fleeing were heading toward government-controlled areas, fearful that Turkish troops and Turkey-backed Syrian opposition fighters might commit atrocities against the Kurds and minority Christians, Alawites and Yazidis in the town.

Turkish troops have destroyed water and power stations that supply Afrin, making it difficult for people to stay there.

“Water has been cut from Afrin for a week now. Everyone is very scared of what’s coming now that the Turkish occupying forces are getting closer to the town’s center,” said resident Serbest Hassan. He said 800,000 civilians in Afrin were now facing a humanitarian “catastrophe” amid food shortages and relentless Turkish airstrikes. There is real fear, he said, of massacres once Turkish troops and their allies reach the town.

Turkey launched the military offensive against the U.S.-backed Syrian Kurdish militia known as YPG, to clear its fighters from the enclave of Afrin. Ankara considers the YPG a terror organization linked to its own Kurdish insurgency.

Near the Syrian capital, meanwhile, a small group of civilians managed to flee eastern Ghouta for government-held areas, while the area’s largest armed rebel group said it had reached an agreement with Russian forces to evacuate the wounded from the besieged territory.

The local council of Douma said in a statement on Saturday that burials had been halted because of airstrikes on the town’s cemetery. It said the humanitarian situation was “catastrophic.”

State-run Syrian TV broadcast footage showing a group of men, women and children it says left the town of Madyara after it was captured by Syrian troops on Sunday. The TV showed several women carrying babies and welcoming the Syrian army, claiming the rebels were preventing civilians from leaving eastern Ghouta.

The civilians used a corridor established by the Syrian army amid military gains that have effectively divided eastern Ghouta into three parts.

Recapturing the enclave would mark one of the most significant victories for President Bashar Assad in the seven-year civil war. It would also be the worst setback for rebels since the opposition was ousted from the eastern half of the city of Aleppo in late 2016 following a similar siege and bombing campaign.

Eastern Ghouta is larger and more populated, with some 400,000 people believed to be living there, trapped under a relentless air and ground bombardment and a crippling years-long siege. More than 1,100 people have been killed since the large-scale government offensive began on Feb. 18.

In rapid advances over the weekend, Syrian government forces split eastern Ghouta in two — a northern and southern part — then cut off the key towns of Douma and Harasta from the rest of the enclave, further squeezing residents living there. Douma is eastern Ghouta’s largest settlement.

The largest rebel group in eastern Ghouta, the Army of Islam, said it had reached an agreement with government-allied Russian forces to evacuate the wounded from the enclave. Its statement said the deal with the Russians was reached through the United Nations.

The Army of Islam said the wounded will be evacuated in stages but made no mention of whether they are rebel fighters or civilians. The group also did not say when the evacuations would begin or where the wounded would be taken.

Meanwhile, at the United Nations, the United States circulated a draft resolution on Monday urging the Security Council to order a 30-day cease-fire in the Syrian capital and eastern Ghouta, expressing “outrage” at the lack of implementation of a resolution adopted Feb. 24 calling for a cease-fire throughout Syria to deliver humanitarian aid and evacuate the wounded and critically ill.

The U.S. draft would eliminate what U.S. Ambassador Nikki Haley called a “loophole” in the Feb. 24 resolution that allows military operations against al-Qaida and Islamist State extremist groups.

Haley also warned Syria that the United States was prepared to take military action for alleged chemical attacks that are killing and wounding Syrian civilians. Noting that since the resolution was passed there have been three allegations of chlorine gas attacks during a stepped up military campaign against rebels, Haley told the council: “This is no cease-fire. The cease-fire has failed.”

Associated Press writer Sarah El Deeb contributed to this report.