The UN Security Council has backed a no-fly zone over Libya and "all necessary measures" to protect civilians short of an invasion.
It was not immediately clear what form intervention would take and when it would begin, though France signalled that action could be imminent.
The resolution appears to give legal weight to attacks against Col Muammar Gaddafi's ground forces.
Col Gaddafi's forces have recently retaken several towns seized by rebels.
Rebel forces reacted with joy to the UN resolution in their Benghazi stronghold, but a government spokesman condemned UN "aggression".
Loyalist forces are bearing down on Benghazi, home to a million people.
Following the UN vote US President Barack Obama called the French and British leaders to discuss the next move. They said Libya had to comply immediately with the resolution.
It is not thought that the US would be involved in the first strikes. The British and French, along with some Arab allies, are expected to play a leading role.
"Given the critical situation on the ground, I expect immediate action on the resolution's provisions," said UN Secretary-General Ban Ki-moon.
BBC diplomatic correspondent Jonathan Marcus says signals from Paris suggest that air operations could be imminent, but this may be an attempt to keep Col Gaddafi guessing.
US officials said an attempt to ground Col Gaddafi's air force could begin on Sunday or Monday.
The UK, France and Lebanon proposed Security Council Resolution 1973, with US support.
In New York, the 15-member Security Council voted 10-0 in favour, with five abstentions.
Russia and China - which often oppose the use of force against a sovereign country as they believe it sets a dangerous precedent - abstained rather than using their power of veto as permanent members.
French Foreign Minister Alain Juppe, introducing the resolution, said: "In Libya, for a number of weeks the people's will has been shot down... by Colonel Gaddafi who is attacking his own people.
"We cannot let these warmongers do this, we cannot abandon civilians."
He added: "We should not arrive too late."
The US ambassador to the UN, Susan Rice, said: "This resolution should send a strong message to Colonel Gaddafi and his regime that the violence must stop, the killing must stop and the people of Libya must be protected and have the opportunity to express themselves freely."
British ambassador to the UN, Sir Mark Lyall Grant, said: "The international community has come together in deploring the actions of the Gaddafi regime and demanding that the regime end this violence against the Libyan people."
He said the UK was "ready to shoulder our responsibility".
But Germany, which abstained, will not be contributing to the military effort. Foreign Minister Guido Westerwelle said his government sees "considerable dangers and risks" in military action against Col Gaddafi.
Chinese foreign ministry spokeswoman Jiang Yu said Beijing had "serious reservations" about the resolution but did not veto it "in view of the concerns and stance of the Arab countries and African Union and the special circumstances that currently apply in Libya".
There was a joyful response to the vote among rebels in Benghazi. Locals cheered, fired guns in the air and let off fireworks to celebrate the imminent no-fly zone.
But Libya's Deputy Foreign Minister Khaled Kaaim said the vote amounted to "a call for Libyans to kill each other", according to Agence France-Presse news agency.
"This resolution shows an aggressive attitude on the part of the international community, which threatens the unity of Libya and its stability," he is reported to have said.
Shortly before the vote, Col Gaddafi told Portuguese television: "If the world is crazy, we will be crazy too."
Earlier on Thursday, addressing the people of Benghazi, Col Gaddafi said his troops were coming "tonight" and there would be "no mercy".
He told rebels to go home, adding that "whoever lays down his weapons" would be pardoned.
Rebel leaders replied by saying their forces would stand firm and not be deterred by Col Gaddafi's threats.
Shortly before the UN vote on Thursday, anti-aircraft fire and explosions were heard in Benghazi.
The Libyan military earlier warned that any foreign operations against Libya would expose all maritime and air navigation in the Mediterranean Sea to danger, state TV reported.
"All civilian and military activities will be the target of a Libyan counter-attack. The Mediterranean Sea will be in serious danger not only in the short term but also in the long term," a screen caption said.
In other developments:
Forces loyal to Col Gaddafi reportedly launched their first air attacks on Benghazi, targeting the airport at Benina
Col Gaddafi's forces attacked the rebel-held town of Ajdabiya, a key objective before launching a ground assault on Benghazi, but rebels deployed tanks, artillery and a helicopter to repel the assault
Libyan state television reported that the city of Misrata was almost entirely under government control, but rebels and residents in the city denied this
Official Libyan news agency Jana reported that government forces would cease military operations from midnight on Sunday to give rebels the opportunity to hand over their weapons and "benefit from the decision on general amnesty"
Following the toppling of the long-time leaders of neighbouring Tunisia and Egypt earlier this year, Libyan protesters started to demand that Col Gaddafi step down after 42 years of autocratic rule.
They quickly seized much of eastern Libya.
Are you in Libya? What is your reaction to the UN vote to back a no-fly zone over the country? Send us your comments and experiences using the form below.
Your E-mail address
Town & Country
In most cases a selection of your comments will be published, displaying your name as you provide it and location unless you state otherwise. But 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.