BANI WALID, Libya - Libyan revolutionary forces repelled an attack by Moammar Gadhafi loyalists on Sunday but faced fierce resistance from a valley separating them from the loyalist stronghold of Bani Walid, fighters said.

Explosions resounded across the area and smoke rose on the horizon as the two sides exchanged fire with rockets and anti-aircraft missiles.

Fighters said they made the push without orders from commanders Sunday after forces loyal to the fugitive leader shelled revolutionary lines at the northern gate of the sprawling town.

"We had no command to enter the city, but they are rocketing us and throwing mortars at us so we had to push through," said Sherif Tajouri, a 41-year-old member of a brigade from the nearby town of Tajoura.

NATO aircraft circled the area, but former rebels say there was no sign of airstrikes.

At one point, fighters in a pickup truck dumped the body of a dead Gadhafi fighter wearing green fatigues onto a pile of mattresses away from the front line. They chanted "God is great" and "Here is one of the rats" and flashed a "V for victory" sign.

The two sides have clashed for days after former rebels made a push toward Bani Walid and Gadhafi's hometown of Sirte to try to break weeks of stalemate and crush the dug-in fighters loyal to the fugitive leader.

Families streamed out Sirte to escape the fighting. Rebels searching vehicles found many assault rifles and pistols. Some people volunteered the weapons; others were confiscated.

While Sirte would be a major symbolic prize, Bani Walid has proven particularly difficult for revolutionary forces.

The loyalists hold the strategic high ground along the ridges overlooking the desert valley called Wadi Zeitoun, which divides the town between northern and southern sections. The terrain has made the town a historical holdout: In the early 20th century, Italian forces occupying Libya struggled to take Bani Walid.

Gadhafi forces blasted fighters at the northern gate with mortar shells, and the revolutionary forces returned fire with machine-guns and rocket-propelled grenades.

Reinforcements from Tajoura, meanwhile, posed on a tank they said was captured after revolutionary forces swept into Tripoli on Aug. 21. Fathi Mselati, 31, from the Tajoura brigade, said more captured tanks were on their way to the front.

Revolutionary forces also have faced fierce resistance in Sirte as they tried to push through crowded residential areas in the coastal city. They claimed Saturday to have progressed less than a mile into the city, along the main coastal highway leading in from the west.

The forces were met by a rain of gunfire, rockets and mortars. A field hospital set up outside Sirte at a gas station filled with wounded fighters, including some from a convoy hit by a rocket-propelled grenade. Twenty-four anti-Gadhafi fighters were killed and 54 wounded in the day's battles, the military council from the nearby city of Misrata reported.

The two sides continued to exchange fire on Sunday.

Abdul Aziz, a 35-year-old businessman, said he was fleeing with his wife and three young children after fighting broke out near his house on Saturday. He said living conditions were difficult in the city of some 100,000 people.

"There hasn't been power in Sirte for a long time. Sometimes there is water, sometimes there isn't. There is food for now but no medicine," he said as revolutionary forces searched his car, which was loaded with clothes, onions and baby powder.

"It's very dangerous in Sirte, yesterday they were fighting near my house, my kids are very scared, that is why I want to get them out," he added.

The pro-regime radio station in Sirte repeatedly aired a recorded message it said was from Gadhafi, urging the city's defenders to fight on. "You must resist fiercely. You must kick them out of Sirte," the voice said. "If they get inside Sirte, they are going to rape the women." The voice resembled Gadhafi's but its authenticity could not be confirmed.

Gadhafi's spokesman, Moussa Ibrahim, vowed, "We have the ability to continue this resistance for months," in a phone call Friday to Syrian-based Al-Rai TV, which has become the mouthpiece for the former regime.

The persistence of the former regime has raised fears of a protracted insurgency of the sort that has played out in Iraq and Afghanistan.

On a third front in Libya's southern desert, hundreds of revolutionary fighters were negotiating with villagers in the still pro-Gadhafi region to surrender peacefully. The fighters collected on a road near the Nahrouqa village on Sunday.

Col. Bashir Awidat has said they seek to secure the surrounding hinterlands before moving against Sabha, the main southern urban centre about 400 miles (650 kilometres) south of Tripoli.

In Tripoli, two Libyan air force pilots who aborted a Gadhafi-ordered bombing raid on a civilian protest before the leader was ousted flew back to the capital Sunday to a hero's welcome.

The men, who had been in Malta, were mobbed by well-wishers who chanted "God is great" on the tarmac. The pilots looked dazed as they were rushed into waiting vehicles and driven away to an unknown location. Their names were not released because of security concerns.