The UN has appointed a new envoy on Libya and is to send a humanitarian team as the battle between forces loyal to Col Gaddafi and rebels intensifies.
UN chief Ban Ki-moon named a former Jordanian minister to deal with Libya and said Col Gaddafi had agreed to allow an assessment team into Tripoli.
The UN's top humanitarian official also demanded urgent access to the town of Misrata after fierce fighting there.
Rebels have been trying to fight off a counter-offensive by Gaddafi forces.
Col Gaddafi's forces have been attacking both near Tripoli and in the east after recent rebel gains.
'Hospital bombed'
A statement from Mr Ban's office said the UN secretary general "notes that civilians are bearing the brunt of the violence, and calls for an immediate halt to the government's disproportionate use of force and indiscriminate attacks on civilian targets".
The statement continued: "He stresses that those who violate international humanitarian law or commit grave crimes must be held accountable."
Mr Ban has appointed Jordan's former foreign minister, Abdelilah Al-Khatib, as his special envoy "to undertake urgent consultations with the authorities in Tripoli and in the region on the immediate humanitarian situation," the statement said.
Mr Ban also said Libyan Foreign Minister Musa Kusa had agreed to accept the immediate dispatch of a humanitarian assessment team to the capital.
UN relief co-ordinator Valerie Amos said that after heavy fighting in Misrata, 200km (125 miles) east of Tripoli, "people are injured and dying and need help immediately".
Government troops with tanks and artillery fought their way into rebel-held Misrata on Saturday before being forced back.
"I call on the authorities to provide access without delay to allow aid workers to help save lives," Baroness Amos said.
A local doctor told the BBC that 21 dead and more than 100 wounded had arrived at his hospital, which he said was also targeted by government troops.
He said the fighting went on for at least six hours.
"They bombed all the houses with heavy weapons. They intentionally gunned and exploded our drug store. They bombed even around our hospital but fortunately nobody was injured. More than five mosques which I know are bombed."
A resident of Misrata, Mohamed Benrasali, told the BBC there were joyous scenes there as the Gaddafi forces were turned back.
He said one government tank had been blown up and 16 Gaddafi soldiers killed. Other soldiers had been captured and would be interrogated on Monday.
With a population of 300,000, Misrata is the largest town controlled by rebels outside their stronghold in the eastern part of the country.
Residents have called for the international community to establish a no-fly zone over Libya to prevent Col Gaddafi's air force from attacking.
In the US, ex-ambassador to the UN Bill Richardson and ex-national security adviser Stephen Hadley were among those advocating the supply of arms to rebels.
'Bigger attack'
Rebels in Zawiya, 50km west of Tripoli, also said they repulsed an attack by government forces on Sunday.
"There was a new attack, bigger than yesterday," rebel spokesman Youssef Shagan told Reuters.
"There were one-and-a-half hours of fighting... Two people were killed from our side and many more injured. We are still in full control of the square."
The anti-government forces are centred in the eastern city of Benghazi. The rebels have set up a Transitional National Council that has called on the international community to recognise it as Libya's sole government.
On Sunday troops backed by helicopter gunships had attacked the major oil town of Ras Lanuf which was taken by rebel forces on Saturday. It is 160km east of Col Gaddafi's well-defended hometown of Sirte.
Rebels said their forces withdrew from Bin Jawad - about 50km north-west of Ras Lanuf - after coming under attack when they advanced.
The UN estimates that more than 1,000 people have died in nearly three weeks of unrest in Libya, which follows public protests in neighbouring Tunisia and Egypt that saw their longtime authoritarian leaders overthrown.
An estimated 200,000 people - mostly foreign workers - have fled the country, creating a humanitarian crisis along Libya's border with Tunisia.
The UN Security Council approved sanctions last week imposing asset freezes and travel bans on Col Gaddafi and his family and aides.
The resolution also referred Col Gaddafi and his inner circle to the International Criminal Court for investigation of crimes against humanity.