The UN Security Council has condemned the Libyan authorities for using force against protesters, calling for those responsible to be held to account.
In a statement, the council demanded an immediate end to the violence and said Libya's rulers had to "address the legitimate demands of the population".
At least 300 people have been killed so far in the uprising.
Earlier, Col Muammar Gaddafi urged his supporters to attack the "cockroaches" and "rats" protesting against his rule.
Anyone who took up arms against Libya would be executed, he warned.
Interior Minister Abdel Fattah Younes al-Abidi - who is considered Col Gaddafi's number two - later resigned and called on the armed forces to "join and heed the people's demands".
The BBC's Jon Leyne, in eastern Libya, says people there reacted with anger and derision to Col Gaddafi's speech.
They fear the veteran leader is out to destroy the country before he is finally deposed.
Our correspondent says that the belief in Libya is that government control is down to a few strongholds, including parts of the capital Tripoli and the southern city of Sabha; but Col Gaddafi is clearly not going to give up the fight.
The UN Security Council's statement came after a day of debate on the uprising in Libya, amid reports foreign mercenaries had been attacking civilians and warplanes bombing protesters.
The council's 15 members said the Libyan government should "meet its responsibility to protect its population", act with restraint, and respect human rights and international humanitarian law.
The Libyan authorities should also hold accountable those people responsible for attacking civilians, and respect the rights of its citizens to peaceful assembly, freedom of expression and press freedom, they added.
British ambassador Mark Lyall Grant said the statement was "extremely strong", and indicated further measures were likely in the coming days.
'Secure the streets'
Libya's deputy permanent representative to the UN in New York, Ibrahim Dabbashi, who on Monday called on Col Gaddafi to step down, said the council's statement was "not strong enough", but still "a good message to the regime in Libya about stopping the bloodshed".
But his superior, Abdul Rahman Mohammed Shalqam, distanced himself from the remarks, calling Libya's ruler "my friend".
The Arab League also condemned the "crimes" in Libya and said it would bar the country from League meetings.
Human Rights Watch says 300 people have died in the violence so far. Libya's interior ministry confirmed that figure, saying it was made up of 189 civilians and 111 soldiers.
During a rambling 75-minute speech broadcast on state TV on Tuesday, Col Gaddafi vowed to crush the revolt.
Standing outside the Bab al-Aziza barracks in Tripoli, damaged by a US air strike in 1986, he vowed: "I am not going to leave this land. I will die here as a martyr. I shall remain here defiant."
He also called on his supporters to "cleanse Libya house by house" until the protesters surrendered.
"All of you who love Muammar Gaddafi, go out on the streets, secure the streets, don't be afraid of them. Chase them, arrest them, hand them over," he said.
He portrayed the protesters as misguided youths who had been given drugs and money by a "small, sick group", and blamed "bearded men" - a reference to Islamists - and Libyans living abroad for fomenting the violence.
"The hour of work is here, the hour of onslaught is here, the hour of victory is here. No retreat, forward, forward, forward. Revolution, revolution," he shouted at the end of the speech, pumping both fists in the air.
Shortly after the speech, a BBC correspondent in Tripoli heard the sound of guns being fired, apparently into the air. She said fireworks were also set off and cars drove through the city at high speed, their horns blaring.
German Chancellor Angela Merkel said Col Gaddafi's speech was "very, very appalling" and "amounted to him declaring war on his own people".
In New York, Mr Dabbashi said he had received information that the Libyan leader's supporters had started attacking people in all western cities.
"The Gaddafi statement was just code for his collaborators to start the genocide against the Libyan people. It just started a few hours ago. I hope the information I get is not accurate but if it is, it will be a real genocide," he told reporters.