A man rebuilds a wall of a damaged building in the rebel held al-Katerji district in Aleppo, Syria Saturday. (Abdalrhman Ismail/Reuters)

Fighting in the Syrian city of Aleppo for several days has cut off the flow of water to millions of residents as a humanitarian crisis shows signs of spreading from opposition neighborhoods to pro-government districts.

Escalating assaults between government soldiers and rebels for control of this key northern city appear to be turning into a crucial battle in the five-year-old conflict, which has killed at least 400,000 people and displaced millions.

The western districts held by Syrian President Bashar al-Assad have not experienced the severe deprivations of areas in the east controlled by rebel forces. But after an array of rebels and extremists linked to al-Qaeda broke the brutal government siege of opposition neighborhoods last week, the rebels escalated the assault to besiege the government side. That has disrupted supplies of food and medicine to an area where more than a million people live, potentially testing loyalties of residents there to the embattled Syrian leader.

In response, rebels and opposition activists say, Assad’s forces have responded with intensified bombings that have struck hospitals and involved munitions containing chlorine gas, a choking agent. Compounding the misery, U.N. officials said Tuesday that fighting had disabled Aleppo’s main power plant, which had pumped water to 2 million people on both sides of the city.

“Prices are getting expensive, and businessmen are choosing not to sell what they have because they want to profit later when prices get even higher,” said Hisham, a resident of a loyalist district in the city’s west end who asked that his last name not be published because of concerns for his safety. Because of Tuesday’s disruptions, he added, his neighborhood now totally depends on water that is trucked in.

A man cuts the beard of a civilian who was evacuated by Syria Democratic Forces fighters from an Islamic State-controlled neighborhood of Manbij. (Rodi Said/Reuters)

Meanwhile, a U.S.-supported force dominated by Kurdish fighters drove Islamic State militants out of the Syrian city of Manbij on Friday. The city near the northern border with Turkey acted as a key hub for funneling militants and weapons to the extremist group, which has lost swaths of territory in Syria and Iraq to U.S.-backed forces.

Manbij “is under full control,” said a fighter in the U. S.-aided group, known as the Syrian Democratic Forces, or SDF, according to Reuters.

About 500 vehicles carrying Islamic State militants fled Manbij on Friday, according to the Syrian Observatory for Human Rights, a Britain-based monitoring group. And images posted on social media that evening purport to show residents of the city celebrating the militant retreat.

The pictures, which could not be independently verified, show veiled women dancing and smoking — activities that are banned by the Islamic State.

SDF fighters launched the campaign to oust the militants from Manbij in June. They have dealt successive blows to the Islamic State in northern Syria, and Friday’s victory could be a prelude to an assault on the Islamic State’s self-declared capital of Raqqa, a city in the country’s northeast.

Seizing all of Aleppo — the largest city in Syria and an important industrial hub before the civil war — has long been a key objective for government and rebel forces. Despite attempted offensives by both sides over the years, the city has only suffered in a bloody stalemate.

In apparent response to recent rebel assaults, pro-government warplanes on Wednesday targeted the city’s opposition areas with at least one bomb suspected of being filled with chlorine gas. Syrian American Medical Society doctors said that at least three people died in the incident, which the United Nations says it will investigate. Amnesty International said 60 people received medical treatment for symptoms associated with chlorine gas, which rights groups say has been routinely used as a weapon by Assad’s government.

Syria’s government declared that it formally destroyed its chemical weapons under an agreement sponsored by the United States and Russia, but arms inspectors suspect it of harboring — and using — illicit stockpiles.

One eyewitness contacted by telephone, Abdulkafi al-Hamdo, said Wednesday’s suspected chlorine gas attack lit up the evening sky. It was followed by a foul smell that made it difficult for his infant daughter to breathe, he said.

Residents also say that airplanes either from Syria’s government or Russia — a key ally of Assad — have increasingly targeted medical facilities in the city’s rebel areas. On Friday, suspected government airstrikes on a maternity hospital and market in the city killed least 18 people.

Some 300,000 people are living in eastern Aleppo, which rebels have controlled since 2012, and they have long faced bombings by Assad’s warplanes and acute shortages of food and basic medicines.

The shortages intensified after pro-government forces — including Shiite militants from Lebanon, Iraq and Afghanistan — took control of the last supply line leading to eastern Aleppo last month.

Rebels and militants from a group with ties to al-Qaeda staged a surprise assault on Aug. 6 that ended the government’s encirclement of the city’s opposition areas. But pro-government air raids have still made it difficult, if not impossible, to bring in aid to opposition areas of the city.

“Now we have both sides of the city in need,” said Christy Delafield, a spokeswoman for Mercy Corps, which runs humanitarian deliveries from Turkey to Syria.

Naylor reported from Beirut and Loveluck from Martha’s Vineyard, Mass. Zakaria Zakaria Zakaria contributed from Istanbul.