Clashes in a former bastion of Muammar Qaddafi killed at least 30 people at the weekend, as confusion surrounded the fates of his youngest son and one of his most-wanted former aides.
Hundreds of Libyans and foreign workers fled Bani Walid yesterday, a day after the heaviest daily death toll in fighting between Qaddafi loyalists and pro-government forces
A defence ministry spokesman said fighting that has been going on for several days had intensified.
As many as 30 members of the security forces had been killed, he added, and civilians in the city said there had been dozens of casualties. Many families were fleeing to the nearby town of Tarhouna, and the military said there were an unspecified number of detainees.
The military operations, led by the Libyan Shield group of rebels-turned-soldiers, were being conducted under the recently-enacted decree number seven, which gives troops the right to use all necessary force to find Qaddafi loyalists, who are widely perceived as posing a threat to the country's security.
Col Salah Al Borki, who heads a brigade of former rebels on the western front, said his forces were advancing on Bani Walid and had seized the checkpoint leading to it.
"We are dealing with some pockets of resistance, particularly snipers posted on rooftops," he said. "We are trying to create safe corridors to allow civilians to leave the city so we can have more room to manoeuvre."
The government announced on Saturday, the first anniversary of of Qaddafi's capture and killing, that the dictator's English-speaking spokesman, Mussa Ibrahim, had been arrested in Bani Walid.
Khamis Qaddafi, the dictator's son, was also reported by a government spokesman to have been arrested and taken to the city of Misurata, but was said to be wounded and may have died on the way.
Both reports were thrown into question yesterday by a ministry of defence spokesman, who was unable to confirm either arrest.
It has been rumoured a number of times that Khamis had been killed but no photographs or footage of his capture have emerged.
There was also no evidence of Mr Ibrahim's arrest, and an audio clip was posted on Facebook on Saturday purporting to be him, denying he had been captured.
"On the subject of my arrest today ... it is an attempt to draw attention away from the crimes committed by Nato's rebels against our people in Bani Walid," the voice said.
Social networking sites were abuzz yesterday with rumours of the capture of the two men. Many Libyans believe prominent members of Qaddafi's regime, including Khamis, took shelter in Bani Walid after the end of the 2011 conflict.
In Tripoli, where revulsion for officials who were part of the 42-year reign of Qaddafi remains high, the mood on Saturday was festive. People honked horns and handed out sweets in the streets as music blared, crying "Allahu Akbar" and spraying over their old Libyan number plates.
Such scenes have become familiar in the country since the cataclysmic violence and overthrow of the regime last year.
But the country's long-standing regional and tribal feuds have been exacerbated by the instability that persisted after the conflict. Residents of Bani Walid and Misurata have said that the recent fighting was precipitated by a feud between the two cities when Omran Shaaban, one of Qaddafi's killers, was detained in Bani Walid and eventually died of injuries sustained there.
His has become a cause celebre, with graffiti bearing his face and name now prominent in Tripoli.
* With additional reporting by Agence France-Presse