This comes after 17 people were killed during a battle between rebels and government troops in the rebel-held city of Misrata.
Libyan rebels said forces loyal to Gadhafi used mortar rounds and rocket-propelled grenades in the attack.
The U.N. will have a "humanitarian presence" in the Libyan capital of Tripoli, which is under Gadhafi's control, U.N. Secretary-General Ban Ki-moon said.
From Tripoli, the U.N. will try to expand operations with the help of the Red Cross and others, said Ban.
The U.N. has already set up an aid operation in the rebel stronghold of Benghazi.
Libya's fighting, which erupted two months ago, has reached a deadlock, with neither side able to gain a decisive advantage and the front line shifting back and forth across a stretch of desert near the eastern city of Ajdabiya.
The Associated Press contributed to this report.