Rebel forces fled in cars and pickup trucks, as government forces showered rockets or tank shells on the city in what appeared to be preparation for a full-scale advance.
The rebels are out-gunned and under-manned.
The main hospital in Ras Lanouf was hit by artillery or an airstrike, forcing rebels to pull their staff out and evacuate patients to the towns of Brega and Ajdabiya.
The retreat was a major setback on a day of rebel victory on the diplomatic front. France decided to recognize the Libyan opposition's Interim Governing Council - the first country to do so.
Germany said it froze billions in assets of the Libyan Central Bank and other state-run agencies. The U.S., UK, Switzerland, Austria and other countries have also frozen Gadhafi's assets.
Gadhafi's forces have reportedly increased air strikes. Officials had considered imposing a no-fly zone over Libya, but U.S. security officials have concluded that it would have little effect.
In the meantime, a BBC news crew said they were held hostage for nearly a day by pro-Gadhafi forces.
The Associated Press contributed to this story.