BEIRUT — Nearly 600,000 Syrians are surging toward the Turkish border to escape unexpectedly swift Syrian government advances into the country's last opposition-held enclave, amid warnings that the exodus could mushroom into the worst humanitarian crisis of the nearly nine-year war.

More than 200,000 people have fled their homes in the past week alone, according to U.N. figures. They are streaming north along clogged roads toward the relative safety of the Turkish border, as Syrian troops, backed by Russian airstrikes, slice through opposition-held towns and villages in the northwestern provinces of Idlib and Aleppo.

They have joined more than 300,000 people displaced from ­areas farther south since the launch of a government offensive in early December, bringing to 586,000 the number of people now on the move in a shrinking pocket of territory hugging the Turkish border.

More than half are children, most of the rest are women, and they are sleeping on roadsides or camping under trees in muddy fields because there is no accommodation to be had, the United Nations says. The existing camps are full, local homes have taken in all the people they can hold, and there is an acute shortage of tents to provide shelter from harsh winter temperatures, which are projected to drop to 19 degrees Fahrenheit over the weekend.

People are burning clothes to keep warm because fuel supplies are scarce, said Mohammed Barakat, who fled his home in rural Aleppo province two weeks ago and is now living in an unfinished building in the town of Harem on the Turkish border.

“Wherever you go, you see people sleeping on both sides of the road because they can’t find any shelter, either in tents or houses,” said Barakat, who works for the civil society group Kesh Malek. “In Harem, there are people on the sidewalks and all over the streets. People are just looking to save their lives.”

Eight international aid agencies jointly warned this week that in a war that has already cost at least 500,000 lives and displaced over 16 million people, the exodus risks turning into a “humanitarian catastrophe” that would dwarf the many disasters that have gone before.

Already, it ranks as one of the biggest single population dislocations since the war began, said David Swanson, a U.N. spokesman based in Turkey. An additional 280,000 people are at immediate risk of being forced to flee as loyalist forces press north and west, herding civilians into an area that was already hosting hundreds of thousands of people displaced by earlier phases of the war.

“We’re seeing an unparalleled exodus of humanity,” Swanson said. “We’re seeing carnage on a scale that we haven’t seen in this crisis in quite some time.”

Syrian troops are now within seven miles of the city of Idlib, home to about 900,000 people who could be expected to join the exodus if loyalist forces attack, the United Nations has warned.

Civilians are also dying in the relentless Syrian and Russian airstrikes that target towns and villages behind the front lines to clear out the civilian population ahead of troop advances. The United Nations puts the number of deaths at 373, with more than 1,000 wounded. Medical facilities have been targeted by airstrikes, the United Nations says, contributing to an acute shortage of treatment for wounded people.

The latest battles serve as a reminder that the Syrian war is far from over, even though its outcome is no longer in doubt. Syrian President Bashar al-Assad has prevailed in Damascus, and the opposition fighters who once held sway over vast areas of the country have now been squeezed into a corner of territory in the provinces of Idlib and Aleppo.

Assad has repeatedly vowed to reclaim every inch of Syrian territory. A cease-fire agreement between Russia and Turkey intended to avert a bloody final showdown broke down last month, and Syrian government forces are now pushing deeper into opposition territory than U.N. officials and Western diplomats had anticipated.

The rebel force is now almost entirely dominated by fighters with the extremist Hayat Tahrir al-Sham, a former al-Qaeda affiliate. Syria and Russia cite the connection to justify the assault as a fight against terrorism.

But there are also 3 million civilians living in Idlib, many of whom fled to the province years ago from battles elsewhere in the country. Among those sleeping out on the streets of the town of Harem are former residents of Homs, Hama, Aleppo, Daraa and Damascus, said Barakat. “You see people from all over Syria,” he said.

There is also still a risk that the fighting could spiral into a wider conflict that could spill beyond Syria. Fearing an influx of refugees, Turkey has dispatched troop reinforcements and armor to the area, where it has maintained observation posts under a rapidly fraying agreement with Russia intended to reduce the violence.

Eight Turkish service members and several Syrian troops were killed this week in skirmishes between the Turkish and Syrian armies. Turkish President Recep Tayyip Erdogan warned afterward that he was prepared to launch a full-scale assault in Syria if loyalist forces continue to advance.

Syrian government forces have been joined in recent weeks by Iranian-backed fighters from Lebanon’s Hezbollah and other non-Syrian militias, according to U.S. officials and videos posted by some of the groups.

The United States is “very, very worried” about the Idlib fighting, James Jeffrey, the U.S. special representative for Syria, told reporters this week. “We think that this is an extremely dangerous conflict,” he said.

At an emergency session of the U.N. Security Council on Thursday to discuss the crisis, the United States and its allies appealed for an immediate cease-fire. But Western diplomats say U.N. action is unlikely because Russia, which wields veto power over Security Council decisions, continues to stand by Assad.