The U.N. Assistance Mission in Libya strongly condemned the bombing.
"UNSMIL calls upon all Libyans during this critical phase to stand in solidarity against all attempts of destruction, terrorism and destabilization of Libya," the organization said in a release issued in Tripoli.
"The mission also underscores the need to support the legitimate authority of the state and enable it to shoulder its responsibilities in ensuring the safety and security of all citizens across Libya."
The bomb was set off near the Al Jalaa Hospital, CNN reported.
Officials said most of the victims were women and children.
The BBC reported that at least nine people were killed in the incident and 17 others were injured. The U.N. officials said it was unclear how many casualties the bomb caused.
"I saw people running and some of them were collecting parts of bodies," a witness of the explosion said.
There was no report on whether any group had taken responsibility for the bombing.
Security has been weak in Libya since the 2011 uprising against longtime leader Moammar Gadhafi, with protests and attacks being carried out by militants, the BBC said.