Fighting resumed in Bani Walid on Friday following a dramatic failure by Libya's rebels to take the town earlier in the week, agencies report.

Fighters for the interim rebel government poured into the desert town held by forces loyal to fugitive strongman Muammar Qaddafi as explosions and gunfire echoed around the town's hills and valleys.

Bani Walid, 180km south of Tripoli, has been under siege for two weeks where die-hard Qaddafi loyalists hold the city center and plan a second-round of fierce resistance.

Earlier Friday it was reported that "columns" of anti-Qaddafi forces sped towards Bani Walid on Friday after their position came under attack. One fighter said they were planning to take the town, one of the last bastions of support for the ousted Libyan leader.

"We have received orders from our commanders and we are going into Bani Walid today from different locations," anti-Qaddafi fighter Mohammad Jwaida told Reuters.

"We were planning to do this today anyway but Qaddafi forces launched this attack to prevent our advance. They thought we would run away, they are cowards," he said.

"We have about a thousand fighters here today," he said, adding that they would not use heavy artillery because "we do not want to harm civilians."

It is unclear how many Qaddafi loyalists hold Bani Walid. In their failed assault earlier this week rebel commanders had estimated a "few hundred," but after being forced to withdrawal amid a loss of discipline in their ranks said their were more hold-outs than expected, perhaps even 1,000.

Earlier Friday rockets fired by Qaddafi forces in Bani Walid had hit a factory, which is also used as a field hospital.

Doctors there told AFP no one had been wounded or killed in the attack. An exchange of heavy machinegun fire followed and large numbers of anti-Qaddafi forces set off to chase the attackers.

"Qaddafi forces fired four or five rockets. We are reinforcing our position and going forward," said anti-Qaddafi fighter Mohamed Al Lawaj.

The fractious rebel commanders around Bani Walid had been waiting for reinforcements before launching another offensive. 

It was not immediately known if those reinforcements had yet arrived, or if Friday's assault had been agreed upon by all of the commanders on the scene.

Bani Walid has been under siege for two weeks, with die-hard Qaddafi loyalists dug into its steep valleys and hills resisting advancing rebel forces.

Elsewhere, Libyan fighters captured the airport near Sirte from forces loyal to the Libyan leader Muammar Gaddafi, Al Jazeera reported on Friday.

The airport lies some 10 km (6 miles) south of Sirte, Gaddafi's hometown and one of the last strongholds controlled by soldiers loyal to the deposed leader.