Mobs attacked Western embassies and UN offices in Tripoli after NATO bombed Muammar Gaddafi's family compound.
Officials said a son of the leader and three of his grandchildren were killed in Sunday's attack.
The UN said it had evacuated its international staff from Tripoli on account of the unrest.
Stephanie Bunker, a spokeswoman for the UN Office for the Co-ordination of Humanitarian Affairs, said that 12 staffers had left Libya and were now in neighbouring Tunisia.
Khaled Kaim, the deputy foreign minister, said on Sunday that the attack was the fourth attempt to assassinate Gaddafi, who was in the building at the time.
Kaim denied the presence of command and control facilities in the Tripoli neighbourhood attacked by NATO.
He also denied allegations that his government had fabricated the deaths and said church leaders in Libya had been allowed to see the bodies in the hospital.
Canadian Lt. Gen. Charles Bouchard, who commands NATO's operation in Libya, said that "we do not target individuals."
However, the leaders of the US, Britain and France have said Gaddafi must go, prompting warnings by UN Security Council members Russia, China and Brazil against NATO attempts to change the regime.
In some of its strongest language, the Russian Foreign Ministry on Sunday accused NATO of a "disproportionate use of force" and cast doubt on NATO's assertion that it is not targeting Gaddafi or members of his family. The ministry called for "an immediate cease-fire and the beginning of a political settlement process without preconditions."
Thousands of migrants from sub-Saharan Africa are among those caught in the fighting in Libya [Al Jazeera]
The vandalised embassies were empty and nobody was reported injured. But the attacks heightened tensions between the Libyan regime and Western powers and prompted the United Nations to pull its international staff out of the capital.
The deputy foreign minister regretted the attacks on the embassies, saying the police force was overpowered by angry crowds.
Kaim said Libya would survey the damages and repair them.
He said the embassies attacked included the British and the Italian and the US commercial and consular affairs department.
Saif al-Arab Gaddafi, the son reported killed in the NATO attack, is the most unknown of the Libyan leader's children, Al Jazeera's Anita McNaught, reporting from the Tunisia-Libya border, said.
"He's one of the low-profile of his children and has been largely invisible since the conflict began," she said.
"He hasn't been visible in any significant form. He hasn't appeared on TV or made any speeches, he hasn't been on any crowd-rallying marches."
Libyan state TV broadcast footing apparently shot in a mortuary showing what appeared to be two bodies, covered by green Libyan flags, lying on metal gurneys. A flower wreath leaned near a wall. Two smaller shapes were covered by white sheets on separate gurneys.
Bishop Giovanni Martinelli, the top Catholic clergyman in Tripoli, said he was shown the bodies in the hospital on Sunday. He said he was told that one was that of Saif al-Arab, but it was so badly disfigured that he could not make a positive identification.
|Follow our coverage of the Libya uprising
Even as the claims about the deaths were being debated, she said fighting continued on the western border near Tunisia, where a number of Gaddafi's troops tried to break through the border crossing into Tunisia.
"Rebel forces seem to know the territory very well here, and as long as they occupy the higher ground, they appear to have the upper hand," McNaught said, adding that she could hear Grad rockets whizzing past.
Separately, pro-democracy forces reported fighting near the opposition-held city of Zintan, where they said NATO air strikes hit pro-Gaddafi troops.
There were also reports of fierce fighting in the western city of Misurata, as opposition fighters tried to seize the city's airport from Gaddafi forces.
The city's port came under heavy shelling by the Gaddafi forces and at least 12 people were killed, a medic said.
In response to its embasssy being vandalised, the UK expelled on Sunday the Libyan ambassador, giving him 24 hours to leave the country.
"The Vienna Convention requires the Gaddafi regime to protect diplomatic missions in Tripoli. By failing to do so that regime has once again breached its international responsibilities and obligations," William Hague, the British foreign secretary, said in a statement, referring to Gaddafi.
"I condemn the attacks on the British embassy premises in Tripoli as well as the diplomatic missions of other countries."