BEIRUT — 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 in the country, half of them children, had been displaced.

The agency, which has remained active in 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. Additionally, 250,000 have fled to Turkey, Jordan and Lebanon, including 100,000 in August.

The sudden water shortage in Aleppo was the latest pinch in a particularly acute humanitarian crisis in Syria's largest city. A witness and two opposition groups that track the violence said heavy shelling from Syrian helicopters appeared to have ruptured the pipe; the Associated Press reported that a Syrian official blamed rebel sabotage.

The opposition groups, the Syrian Observatory for Human Rights and the Local Coordination Committees, reported that water flooded into the neighborhoods of Al Midan and Bustan al-Basha in the northern part of Aleppo. Activists distributed video images of brown water coursing over curbs and flooding basements as residents carrying children or weapons waded past.

At the same time, Majed Abdulnoor, an activist and informal rebel spokesman interviewed online, said a rebel brigade had besieged the Al Mudahami security building in Al Midan, blocking any food, water or ammunition from reaching soldiers inside. The shells that cut off the water, Abdulnoor said, were fired in an attempt to free the building. Because Syria restricts the access of journalists, none of the accounts could be confirmed independently.

After reporting a day earlier that they had captured a military headquarters in the Aleppo neighborhood of Hanano, rebels said Saturday that the battle was still under way, with parts of the complex still controlled by the government.

Abdulnoor said there are some foreign fighters among the rebels, touching on a theme that has been a hallmark of the government's characterization of the civil war as a defense against foreign intervention. The participation of foreigners has also raised questions among some in the West who fear the entry into the conflict of fighters motivated by a militant Islamist ideology.