The bombardment dropped off after a huge blast -- which rebels believed to be a strike by NATO warplanes -- on the outskirts of Ajdabiya, where some buildings were set ablaze by the government barrage. NATO officials in Brussels had no immediate comment.
During the attack, rebels pulled back and opened fire with their own heavy weapons to try to hold the town, which controls key roadways to the main opposition strongholds in eastern Libya. But it appeared pro-Gadhadi forces had taken up positions inside the town and kept up with gunfire after the shelling eased.
The supervisor at Ajdabiya hospital, Mohammed Idris, said at least three rebels were killed and two people injured, including a civilian.
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 from Ajdabiya when the shelling began, but later appeared to attempt a counter-offensive with heavy machine guns and rockets.
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 Gadhafi's forces.
The eastern Libyan port has changed hands more than five times since the uprising against Gadhafi's rule began in February. The port and oil storage facilities are strategic for both sides.
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.