Water supplies to the Libyan capital were restored on Tuesday, days after gunmen stormed the main water distribution station for the Libyan capital and closed valves.
At least 2 million people would have been impacted if the water had remained shut off.
UN spokesman Stephane Dujarric said humanitarian officials were deeply concerned after the attack on Sunday.
The group raided a station of the Great Man-Made River Project, a pipe network supplying groundwater from the Sahara. The gunmen forced employees to turn off the pipes at the installation 400km south of Tripoli.
Some districts in Tripoli had already begun experiencing low water pressure but the full impact of the shut off hadn't taken effect as Mr Dujarric said it can take at least two days to filter through.
Tripoli's water supply had already been affected before Sunday's incident because maintenance workers at the main distribution station were withdrawn for security reasons.
The Tripoli government blamed a group that also cut water supplies in 2017, saying its commander, Khalifa Ehnaish, backs the Libyan National Army of Field Marshal Khalifa Haftar. But the LNA denied that Mr Ehnaish was responsible.
The LNA launched an offensive from the east on April 4 seeking to take Tripoli. Field Marshal Haftar's forces are battling militias loosely allied with a weak government in the capital.
Civil war in Libya in 2011 toppled and killed longtime dictator Muammar Qaddafi, and the chaos that followed resulted in a divided country, with the UN-aligned administration in Tripoli overseeing the country's west and a government in the east aligned with Field Marshal Haftar.
The Tripoli administration is backed by several militias, including terrorist groups. The LNA has the backing of several tribal forces in the east and south.
Mr Dujarric said clashes in and around Tripoli continue "to surge", increasing the number of civilians who have fled their homes to more than 78,000.
The UN has verified 126 civilian casualties to date, including 29 fatalities, he said, but the number "should be considered a minimum".
The battle for the Libyan capital has threatened to ignite a civil war on the scale of the 2011 uprising against Qaddafi.