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.

Analysis

By Barbara PlettBBC UN correspondent

Despite weeks of anti-government protests in the Arab world, this was the first time the UN Security Council took up the issue. Not only that, it managed to produce a statement with reasonably strong language (by its standards) and maintain unity.

Russia and China signed on despite previous reluctance to intervene in what they have argued were the internal affairs of sovereign countries. Of course, the renegade Libyan mission here forced the issue by calling for intervention.

But diplomats said the scale of the violence in Libya is really what prompted action. European nations are also alarmed at the prospect of refugees spilling over their border. And Libya is the first Opec country to be hit by major protests, prompting oil prices to surge.

Col Gaddafi's bellicose speech only strengthened resolve here to agree a statement that would at least warn him the world is watching.

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".

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.

Image caption
Opposition supporters say the Libyan authorities have been using tanks, warplanes and mercenaries

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.

Are you in Libya? Are you taking part in demonstrations? Are you an expat trying to leave? Send us your comments using the form below:

If you are happy to be contacted by a BBC journalist please leave a telephone number that we can
contact you on. In some cases a selection of your comments will be published, displaying your name as
you provide it and location, unless you state otherwise. Your contact details will never be published.
When sending us pictures, video or eyewitness accounts at no time should you endanger yourself or others,
take any unnecessary risks or infringe any laws. Please ensure you have read the terms and conditions.