The United Nations Security Council (UNSC) has backed a resolution authorising a no-fly zone over Libya and "all necessary measures" - code for military action - to protect civilians.
Ten of the council's 15 members voted in favour of the resolution on Thursday, while Russia, China, Germany, India and Brazil abstained.
France said on Friday morning that military action in Libya would come "rapidily ... within a few hours", but did not specify the targets or in what form the action would come.
However officials in the US and Britain have suggested that military intervention would not begin until Sunday or Monday. The NATO military alliance is also due to meet later on Friday to discuss its response to the resolution.
The Libyan government has closed its airspace to all traffic in response to the development, Eurocontrol, Europe's air traffic agency, said.
Despite choosing not to use its veto to block the resolution, China on Friday expressed serious concerns about imposing the no-fly zone.
"We oppose the use of military force in international relations, and have serious reservations about some of the content of the resolution," Jiang Yu, a foreign ministry spokeswoman, said in a statement.
Turkey on Friday also voiced concern over military intervention, calling for an immediate ceasefire in Libya instead.
But no votes were recorded against the resolution, which was co-sponsored by France, Britain, Lebanon and the United States.
|Read the Libya Live Blog
Under the no-fly zone, only military aircraft are forbidden to fly in Libyan airspace. It exempts commercial and humanitarian flights.
Riad Kahwaji, a military analyst in Dubai, told Al Jazeera that to set up a no-fly zone, coalition forces would have to take out Gaddafi's air defences, including the bases, runways and helicopter gunships that could be used to fire on civilians.
In Benghazi, the main opposition stronghold, a large crowd watching the vote on an outdoor TV projection burst into celebration and green and red fireworks filled the air as the resolution was announced.
Reporting from the eastern city, Al Jazeera's Tony Birtley said the city had been given new buoyancy. "They can go back into this fight with renewed vigour, with renewed hope," he said.
James Bays, Al Jazeera's correspondent in the eastern city of Tobruk, said the sound of gunfire rang out through the night. "Guns were not being fired in anger, but in celebration," he said.
"This is what they have been waiting for, they have been calling for a no-fly zone from the UN ... people here are buoyed by the news."
However, Bays added that it was "worth injecting a note of caution" into the current excitement, as Gaddafi's troops were still standing firm.
His forces have reportedly begun a heavy bombardment of the rebel-held town of Misurata, the last big opposition stronghold in western Libya.
'We will be crazy too'
The UN resolution came just a few hours after Muammar Gaddafi, the embattled Libyan leader, warned residents of Benghazi that his forces would show "no mercy" in an impending assault on the city.
"The matter has been decided ... we are coming," he said in a radio address on Thursday.
The Libyan leader called pro-democracy fighters in Benghazi "armed gangsters" and urged residents to attack them, saying: "You all go out and cleanse the city of Benghazi.
"We will track them down, and search for them, alley by alley, road by road ... Massive waves of people will be crawling out to rescue the people of Benghazi, who are calling out for help, asking us to rescue them. We should come to their rescue."
In an interview broadcast just before the Security Council voted on the resolution, Gaddafi dismissed the body's actions.
"The UN Security Council has no mandate. We don't acknowledge their resolutions," he told the Portuguese public Radiotelevisao Portuguesa.
|Follow our coverage of the Libya uprising
He pledged to respond harshly to UN-sponsored attacks. "If the world is crazy, we will be crazy too," he said.
Speaking to reporters in Tripoli after the vote, Khalid Kaim, the Libyan deputy foreign minister, took a conciliatory tone, offering to negotiate a ceasefire with the rebels.
"We are ready for this decision [a ceasefire] but we require an interlocutor to discuss how to implement it," Kaim told a news conference.
"We discussed last night with the UN envoy [for Libya, Jordan's Abdul Ilah Khatib] and asked legitimate questions on the application of a ceasefire," he said.
Kaim indicated that Libya would "react positively to the UN resolution, and we will prove this willingness while guaranteeing protection to civilians."
Susan Rice, the US ambassador to the UN, said "This resolution demands an immediate ceasefire and a complete end to violence and attacks against civilians.
"The security council has authorised the use of force, including enforcement of a no-fly zone to protect civilians and civilian areas targeted by Colonel Gaddafi, his intelligence and security forces and his mercenaries," Rice said.
However the UN resolution rules out sending foreign ground troops.
Earlier the Libyan defence ministry warned that "any military operation against Libya will expose all air and maritime traffic in the Mediterranean to danger."
"Any civilian or military moving traffic will be the target of a Libyan counter-offensive," the official Jana news agency quoted the defence ministry spokesman as saying.
The latest developments came amid claims and counter-claims about the progress of fighting between forces loyal to Gaddafi and rebels.
|Celebratory gunfire and fireworks burst into the night sky following the UN vote on a no-fly zone
The rebels are seeking to end Gaddafi's more than 41-year-old rule.
State television said loyalists were on the outskirts of Benghazi, while the opposition claimed that fighters in Benghazi had shot down two government warplanes.
Opposition fighters in the western city of Zintan, about 120km southwest of the capital Tripoli, said they were bracing for an attack by forces loyal to Gaddafi.
"According to the fighters, forces loyal to Gaddafi are trying to encircle Zintan.
"There are troop movements around the north and southwest. They expect a big attack on the city. I heard no gunfire this morning. They say they blocked the main column [of tanks] during the night," a witness told the AFP news agency.
Fighting is also raging for the control of Ajdabiya, the gateway to Benghazi.
A doctor told the AFP news agency that fighting was still going on in and around the town, which also guards the road to Tobruk and the Egyptian border in the rebel-held east.