Some rebels on Saturday made it into the outskirts of Brega, 50 miles to the west, but many others retreated to Ajdabiyah after six were killed by rockets fired by Gaddafi loyalists on the exposed coastal road joining the two towns.
By Sunday, scores of volunteer fighters and civilian cars carrying men, women and children streamed east from Ajdabiyah up the coast road toward Benghazi, where the popular revolt against Gaddafi's 41-year rule began on February 17.
In western Libya, the rebel-held city of Misrata has been under government siege for seven weeks, leading to a growing humanitarian crisis. Hundreds of civilians are believed to have been killed in the fighting and shelling of the city.
A rebel spokesman said Gaddafi's forces bombarded Misrata again on Sunday, killing at least six people. Abdel Basset Mezerik said at least 47 people were also wounded.
The United States, France and Britain said last week they would not stop bombing Gaddafi's forces until he left power, although when or if that would happen was unclear.
The rebels pushed hundreds of kilometres toward the capital Tripoli in late March after foreign warplanes began bombing Gaddafi's positions to protect civilians, but proved unable to hold territory and were pushed back as far as Ajdabiyah.
"From a military point of view, one can currently see there is a stalemate," the head of Germany's intelligence service, Ernst Uhrlau, told the Hamburger Abendblatt newspaper.
"One cannot predict at the moment how much longer Gaddafi can hold onto power. The area around Tripoli is much stronger in terms of the population and the tribes than the east," he said.
Earlier on Sunday a sandstorm obscured the flat expanse of desert stretching west from Ajdabiyah to Brega. Rebel Ahmed al-Zuwaihi blamed the weather for a lack of NATO air strikes.
"The weather is no good today. NATO hasn't hit anything," he said. "It's a big opportunity for Gaddafi and he's taking advantage of it. He might enter Ajdabiyah today. Today the planes are not going to hit anything."
NATO warplanes instead bombed the area of Al-Hira, 50 km (30 miles) southwest of the capital Tripoli and also hit the city of Sirte, Libyan state television said. Bursts of anti-aircraft fire were heard in Tripoli on Sunday evening.
In Misrata, rebels say they have faced daily bombardment from Gaddafi's forces. The U.S.-based rights group Human Rights Watch has accused Gaddafi's forces of using cluster bombs -- which scatter bomblets over a wide area, increasing civilian casualties. The Libyan government has rejected the allegations.
A rebel spokesman, called Abdelsalam, said there was fighting around Misrata's main thoroughfare Tripoli Street.
"Snipers are firing in all directions," he said. "For three days, it was very tough. Gaddafi troops were launching powerful attacks. They have been firing artillery, mortars."
Food was running short and long queues formed outside bakeries. Some streets were fast becoming unrecognizable.
The Libyan government blames militants allied to al Qaeda for the fighting. Foreign Minister Abdelati Obeidi held talks with U.N. envoy Abdelilah Al-Khatib in Tripoli and condemned "the unjustified crusader colonial aggression on Libya."
He said Libya was ready to comply with U.N. resolutions to implement a ceasefire and allow the delivery of humanitarian aid, according to the Jana state news agency.