RAS LANOUF, Libya -- Libyan warplanes launched airstrikes and forces loyal to leader Muammar Qaddafi engaged in fierce ground battles Sunday with a rebel force advancing west toward the capital Tripoli along the country's Mediterranean coastline.

The opposition fighters pushed out of the rebel-held eastern half of Libya late last week and have been cutting a path west toward Tripoli. On the way, they secured control of two important oil ports at Brega and Ras Lanouf. By Sunday, the rebels were advancing father west when they were hit by airstrikes and confrontations with ground forces.

Associated Press reporters at the scene said Qaddafi loyalists retook the town of Bin Jawad, about 110 miles east of Qaddafi's stronghold city of Sirte, which could prove to be a decisive battleground. The reporters witnessed airstrikes on the rebel forces and heavy fighting on the ground.

The uprising that began on Feb. 15, inspired by rebellions in neighboring Tunisia and Egypt, has been sliding toward a civil war that could be prolonged, with rebels backed by mutinous army units and arms seized from storehouses going on the offensive to try to topple Qaddafi's 41-year-old regime. At the same time, pro-Qaddafi forces have tried to conduct counteroffensives at

Brega and in the rebel-held city of Zawiya west of Tripoli -- where bloody street battles were reported over the weekend.

The U.S. has moved military forces closer to Libya's shores, but has expressed wariness about talk of imposing a "no fly" zone over the North African nation to prevent Qaddafi from using his warplanes to attack the population. The U.N. has imposed sanctions, and Libya's oil production has been seriously crippled by the unrest. The turmoil has caused oil prices to spike on international markets.

In Tripoli, the city of 2 million that is most firmly in Qaddafi's grip, residents were awoken before dawn by the crackle of unusually heavy and sustained gunfire that lasted for at least two hours.

The reason for the gunfire was no immediately clear, though Libyan authorities said it was to celebrate the regime taking back Ras Lanouf near the rebel-held east and the city of Misrata close to Tripoli. Despite those claims, AP reporters saw the rebels in control of Ras Lanouf early Sunday and residents of Misrata said the city remained in opposition hands.

By early morning, thousands of Qaddafi's supporters poured into Tripoli's central square for a rally, waving green flags, firing guns in the air, and holding up banners in support of the regime.

Hundreds drove past the Bab al-Aziziya military camp where Qaddafi lives, waving flags and cheering. Armed men in plainclothes were standing at the gates, also shooting in the air. Qaddafi's whereabouts were unknown.