BEIRUT, Lebanon — Clashes between the Syrian military and rebel fighters burst a main pipe that delivered drinking water to hundreds of thousands of residents of Aleppo, opposition groups said Saturday, as the United Nations refugee agency said more than 1.2 million Syrians still inside the country, half of them children, had been displaced from their homes.

The agency, which has remained active inside Syria throughout the conflict, said the number of people in need of assistance there had doubled since July to 2.5 million, out of Syria’s population of about 21 million, not including the 250,000 refugees who have fled to camps in neighboring countries. The sudden water shortage in Aleppo was the latest hardship in a particularly acute humanitarian crisis in Syria’s largest city, brought on by more than a month of street fighting and weeks of air attacks. A witness and two opposition groups that track the violence said Saturday that heavy shelling from Syrian helicopters appeared to have ruptured the water pipe; The Associated Press reported that a Syrian official blamed rebel sabotage.

The opposition groups, the Syrian Observatory for Human Rights and the Local Coordinating Committees, reported that water flooded the neighborhoods of Al Midan and Bustan al-Basha. Activists distributed video of brown water coursing over curbs and flooding basements as residents waded past with children or weapons in their arms.

A rebel brigade was also trying to cut off food and water to a contingent of soldiers inside the city, said Majed Abdulnoor, an opposition activist interviewed online. He said that a rebel brigade had besieged the Mudahami security building in Al Midan, blocking food, water or ammunition from reaching soldiers inside. The shells that cut off the water, Mr. Abdulnoor said, were fired in an attempt to free the building.