Updated

AJDABIYA, Libya -- Government forces shelled the rebels' main front-line outpost Saturday, forcing fighters to pull back and open fire with their own heavy weapons to try to hold the town.

As the shelling intensified, a major blast occurred on the outskirts of the city and threw up a mushroom cloud. It was not immediately clear whether it was a NATO airstrike or part of the ground battle, but the shelling ceased soon afterward.

The government attacks on Ajdabiya quickly changed the fortunes of rebels who had earlier sent units deeper toward the strategic oil port of Brega, 40 miles from Ajdabiya, and captured two soldiers loyal to Muammar al-Qaddafi.

It's unclear whether government troops would make a push of their own into the eastern town of Ajdabiya, which has been nearly deserted by civilians. But taking control of the town would open the way to the rebel stronghold of Benghazi and the eastern port of Tobruk near the Egyptian border.

Most rebel forces pulled back to Ajdabiya when the shelling began, but later appeared to attempt a counter-offensive with heavy machine guns and rockets. Black smoke rose from parts of the town and some buildings were ablaze.

Earlier, rebels had pushed deeper toward Brega, a key prize in the back-and-forth battles with government forces.

Rebels say they took two prisoners after a clash with soldiers near Brega's Bright Star University, outside the government-controlled oil facilities, marking a noticeable advance by rebels against Qaddafi's forces.

The eastern Libyan port has changed hands more than five times since the uprising against Qaddafi's rule began in February. The port and oil storage facilities are strategic for both sides.

Rebels have regrouped on the front lines after a mass retreat Thursday when NATO airstrikes accidentally hit a rebel armored column.

In western Libya, the Red Cross said a relief ship reached the only rebel-held city, Misrata, which was the scene of heavy battles on Friday.