BENGHAZI, Libya — In a show of defiance, Moammar Gadhafi's forces bombarded the last rebel-held western city for a second day Friday as the international community raced to stop him after the U.N. authorized "all necessary measures" to protect the Libyan people, including airstrikes.

The attack on Misrata, Libya's third-largest city, comes as the rebels were on the defensive in their eastern stronghold after Gadhafi vowed to launch a final assault and crush the nearly 5-week-old rebellion against him.

The opposition expressed hope the U.N. resolution, which was passed late Thursday after weeks of deliberation, would help turn the tide in their favor after days of fierce fighting.

The U.N. Security Council resolution sets the stage for airstrikes, a no-fly zone and other military measures short of a ground invasion.

"We think Gadhafi's forces will not advance against us. Our morale is very high now. I think we have the upper hand," Col. Salah Osman, a former army officer who defected to the rebel side, said. He was speaking at a checkpoint near the eastern town of Sultan.

Britain announced that it would send fighter jets and France was making plans to deploy planes, but as of Friday morning the U.S. had yet to announce what its role would be. NATO also was holding an emergency meeting.

The U.S. has positioned a host of forces and ships in the region, including submarines and destroyers and amphibious assault and landing ships with some 400 Marines aboard. It also could provide a range of surveillance assets.

Military experts cautioned that the consequences of such action are unpredictable. The former head of the British army, Richard Dannatt, said it was crucial to proceed cautiously "so we don't get into the kind of situation that we got into in Iraq by not having a Plan B for the morning after."

But the Western powers faced pressure to act urgently after weeks spent deliberation over what to do about Gadhafi as his regime gained momentum.

Gadhafi pledged to respond harshly to U.N.-sponsored attacks in an interview with Portuguese television broadcast just before the U.N. vote. "If the world is crazy," he said, "we will be crazy, too."

The Libyan government closed its airspace to all traffic Friday, according to Europe's air traffic control agency, Eurocontrol.

Libyan Deputy Foreign Minister Khaled Kaim offered to negotiate a cease-fire with the rebels. He welcomed the Security Council's concern for the people of Libya but called on the world not to allow them to receive weapons. "If any countries do that, they will be inviting Libyans to kill each other," he said.

Government tanks rolled into Misrata, 125 miles (200 kilometers) southeast of Tripoli, shelling houses, hospitals and a mosque for several hours Friday before pulling back to the city's outskirts, witnesses said. At least six people were killed, raising the total death toll in two days of fighting to nine, a local doctor said.

Misrata is the last rebel holdout in the western half of the country after Gadhafi recaptured a string of other cities that had fallen to the opposition early in the uprising that began Feb. 15. Its fall would leave the country largely divided, with the rebels bottled up in the east near the border with Egypt.

The city has been under a punishing blockade that has prevented aid ships from delivering medicine and other supplies, the doctor said.

"They haven't stopped shelling us for a week — we sleep to shelling, and wake up to shelling. They are targeting houses and hospitals," he said, adding the hospital had been overwhelmed.

"We have had to perform surgeries in the hallways using the light from our cell phones to see what we're doing. We are also using some clinics around the town, some only have 60 beds, which isn't enough," he said.

Another doctor claimed Gadhafi's forces had surrounded some neighborhoods and were shooting at people who ventured out of their homes. "Militias used two ambulances to jump out of and shoot at innocent people indiscriminately," he said.

The shift toward international action reflected dramatic change on the ground in Libya in the past week. The rebels, once confident, found themselves in danger of being crushed by an overpowering pro-Gadhafi force using rockets, artillery, tanks, warplanes. That force has advanced along the Mediterranean coast aiming to recapture the rebel-held eastern half of Libya.

Gadhafi troops encircled the city of Ajdabiya, the first in the path of their march, but also had some troops positioned beyond it toward Benghazi, the second largest Libyan city, with a population of about 700,000.

A large crowd in Benghazi was watching the vote on an outdoor TV projection and burst into cheers, with green and red fireworks exploding overhead. In Tobruk, east of Benghazi, happy Libyans fired weapons in the air to celebrate the vote.

Comment on this story

Libya's unrest began in Benghazi and spread east to Tripoli, the capital. Like others in the Mideast, the uprising started with popular demonstrations against Gadhafi, rejecting his 41 years of despotic and often brutal rule. The tone quickly changed after Gadhafi's security in Tripoli forcefully put down the gatherings there.

Soon rebel forces began arming themselves, quickly taking control of the country's east centered on Benghazi. Some Libyan army units joined the rebels, providing them with some firepower, but much less than Gadhafi's remaining forces.

There are no reliable death tolls. Rebels say more than 1,000 people have been killed in a month of fighting, while Gadhafi claims the toll is only 150.

Associated Press writers Slobodan Lekic in Brussels and Jill Lawless in London contributed to this report.