Rebels seeking to advance toward the hometown of Libyan leader Moammar Kadafi and open a new front against the capital were battered from the ground and air, forcing them to retreat along a vital stretch of Mediterranean coast.
The rebels seemed stunned by the sudden counterattack by pro-Kadafi forces. A few hours earlier they had spoken of pushing past Bin Jawwad, which they'd captured Saturday, to lay siege to Surt, a Kadafi stronghold where thousands of pro-government fighters have massed.
Instead, a bloodied convoy of rebel vehicles retreated from Bin Jawwad, the western front of the rebels' advance, and regrouped 27 miles to the east in Ras Lanuf, which fighters seized two days earlier.
Bin Jawwad lies on the fault line between western Libya, controlled by Kadafi, and eastern regions that threw off his rule last month.
If the rebels manage to capture Surt, they will have a relatively clear path to the capital, Tripoli, presenting Kadafi with a new threat on his eastern flank. Currently, in order to reinforce opposition groups battling government forces in Tripoli and other western towns, rebels must take a dangerous detour south through the Sahara desert.
It is equally important for rebels to retain Ras Lanuf, home to an oil refinery and petrochemical complex, a port and a small airport. Ras Lanuf and Port Brega give the rebels control over the flow of petroleum in eastern Libya, which produces three-quarters of the country's oil.
In addition to the fighting Sunday in Bin Jawwad, a government airstrike targeted Ras Lanuf, destroying three hangars at a small military base. Kadafi's forces also attacked rebels holding Misurata and Zawiya, two towns west of Tripoli.
Helicopter gunships strafed rebels in the town center of Bin Jawwad. The rebels also were pounded by artillery and mortars, and picked off by snipers who fired from rooftops and lobbed grenades. Several rebels said at least one jet fighter also attacked their positions.
Opposition fighters tried several times during the afternoon to fight their way back into Bin Jawwad, but were held at bay by helicopter gunships and artillery. The rebels fired back with antiaircraft guns, grenade launchers and automatic rifles.
Through the afternoon, rebels in trucks mounted with antiaircraft guns or towing recoilless rifles sped west from Ras Lanuf toward Bin Jawwad. Others fired futilely in the air at the sound of aircraft in the distance. Rebels' claims that they had shot down a government plane could not be confirmed.
By nightfall, Kadafi's forces apparently retained control of Bin Jawwad, but heavy fighting and conflicting reports made it difficult to determine the situation there.
Exhausted rebel fighters said the government counterattack began after a small group of Kadafi loyalists pretended to defect Sunday morning, then opened fire. Rebels accused pro-Kadafi fighters of using civilians in Bin Jawwad as human shields, but those claims could not be confirmed.
At least two homes were set afire by airstrikes, the rebels said, and civilians were caught in the crossfire.
"They were shooting at people from helicopters, just killing anybody they saw," said Mouftah Zawki, 40, a rebel fighter who said the Mazda van he had driven to the front was destroyed in a helicopter attack.
Zawki said he and nine other fighters escaped by piling into a four-door sedan. He said the pro-Kadafi fighters had taken over the city center and a small mosque.
"They had too many heavy weapons for us. We couldn't stop them," said Ali Suleman, 36, who said he crouched behind a wall as an attack helicopter fired rounds at rebels. They took cover in homes before retreating.
Another fighter, overhearing Suleman, muttered, "A disaster!"
At least six people died and 60 were wounded, hospital officials told the Associated Press. Ambulance drivers at Ras Lanuf Medical Center said they tried to collect other dead and wounded but were driven back by gunfire. Several bodies were burning, they said.
Other ambulances, their sirens wailing, sped east on the coastal highway during the fighting, delivering wounded to a hospital deeper into rebel territory in Ajdabiya.
As some fighters ate and rested in Ras Lanuf, a rebel in military fatigues and wielding a short-barreled automatic weapon screamed at them, then fired a burst into the air.
"Your brothers are dying in Bin Jawwad and you're sitting here eating!" he yelled. "If you want to just watch, go home!"
At another rebel roadside post, several fighters urged fellow gunmen to plunge into the fight. Many are inexperienced volunteers who left school or jobs to join the revolt against Kadafi, and some seemed overwhelmed by the day's events.
"Move! Move!" one fighter shouted at several gun trucks that clogged the road, blocking other fighters in private cars from advancing down the highway. These rebels waved automatic weapons out of car windows, chanting slogans and vowing revenge.
Some rebels said tribesmen in Bin Jawwad had turned against them and helped Kadafi loyalists by letting them use their homes to ambush the rebels.
Several tribesmen interviewed Saturday in Bin Jawwad, hours before the rebels advanced into the hamlet, said they wanted to be left alone and not be forced to choose sides. They vowed to fight and kill anyone who threatened them or their families.
The opposition continued to rush men and weapons to Ras Lanuf from across eastern Libya. The coastal highway from Benghazi, 225 miles east, was clogged Sunday with trucks ferrying antiaircraft weapons, rocket launchers, grenade launchers and crates of ammunition, bread and bottled water.
The Ras Lanuf oil facility's 3,500 workers — including 300 expatriates who fled by boat last month — have stopped working during the fighting, two managers said Sunday.
But the rebels are supplied with fuel from the oil complex at Port Brega, which they took back from pro-Kadafi forces Wednesday. Workers at the facility have said a skeleton staff, about a quarter of the normal workforce, is keeping the complex running at reduced capacity.
Times staff writer Garrett Therolf in Cairo contributed to this report.