BANI WALID, Libya, Oct 17 (Reuters) - Fighters with Libya’s interim government fired their guns into the air and hoisted the country’s new flag over the centre of Bani Walid on Monday to celebrate their capture of one of the final bastions of Muammar Gaddafi’s loyalists.

A Reuters team that drove into the heart of Bani Walid, in desert hills 150 km (90 miles) south of Tripoli, saw no signs of resistance from supporters of the deposed leader who have been holed up inside the town for more than six weeks.

“Bani Walid is completely free. It is liberated, 100 percent,” said Mohammed Shakonah, a military commander with the National Transitional Council (NTC).

The apparent capture of Bani Walid brought Libya’s new rulers a step closer to being in full control of the vast, oil-producing North African country almost two months after rebels entered Tripoli and ended 42 years of one-man Gaddafi rule.

Along with Gaddafi’s hometown of Sirte, Bani Walid was one of Libya’s last repositories of armed resistance to the NTC.

Bursts of gunfire, fireworks, and car horns merged into a cacophony on streets littered with empty bullet casings and lined with buildings damaged or destroyed by the fighting.

Some buildings were still ablaze, others were flattened by NATO air strikes. Several shops looked like they had been looted. Thick black smoke billowed in the distance.

An NTC fighter in camouflage fatigues and with an AK-47 assault rifle hanging from his shoulder, embraced a medical worker and both men wept in joy.

“If Gaddafi could see this, he would give up,” said Abdelfattah, another NTC fighter in the central square.

There was no evidence of civilians joining in the street celebrations in Bani Walid, home to the Warfalla, Libya’s biggest tribe, whose members are traditional supporters of Gaddafi.

“This is a very important day because it now means Gaddafi doesn’t have even one town in Libya,” said Ayad Sayed al Russi, a senior NTC commander. “We hope that the residents who fled will come back now that the town is free.”

The town had been under siege for weeks, with hundreds of Gaddafi loyalists dug into its steep valleys and hills resisting advancing interim government forces.

NTC officials had been negotiating with Bani Walid’s tribal leaders for its surrender.

SIRTE FIGHTS ON

In Sirte, where Gaddafi loyalists have been under siege for weeks, there was little or no indication of the often disorganised NTC forces making any progress on Monday. Chaos and confusion forced them to retreat in some places.

A doctor for the medical aid charity Medecins Sans Frontieres in Sirte has estimated that 10,000 people remain trapped in the city of 75,000. Many are women and children, some are sick or injured.

NTC tanks and rockets bombarded a small area of central Sirte where they have boxed in the remaining Gaddafi loyalists. Libya’s new leaders say they will only begin the transition to democracy after they capture the city.

Frustration is growing on the front line. Some fighters are irritated that their commanders have not ordered a big push to take the rest of the city.

There is also anger between NTC forces from Misrata to the west and from Benghazi to the east, who have accused each other of hitting their allies in “friendly fire” incidents.

“What we are trying to do is to limit attacks from the east and west to avoid friendly fire, and instead attack from the south,” said Mohammad Al Sabty, a field commander.

“We have lost a lot of martyrs in recent days,” said Mustafa Salim from a Misrata brigade. When Misrata units get close to Benghazi units “it gets harder,” he said. “They fire at us and we fire at them.”

Many NTC fighters abandon their positions at nightfall for more comfortable quarters further from the front line. That allows Gaddafi’s men to infiltrate the lines during the night and fire at them, sometimes from behind.

Government forces captured 15 Gaddafi loyalist fighters on Monday, all of them black, a Reuters witness said. Gaddafi armed many sub-Saharan Africans to fight for him and black people have been subject to arbitrary reprisals by the NTC forces.

Some government fighters present tried to hit the newly captured prisoners, but were held back by more senior officers and the 15 men were marched off to the rear as NTC forces laid down suppressing fire at nearby snipers.

The new government’s forces have been accused of mistreating prisoners and Amnesty International said in a report last week it was in danger of repeating some of the abuses of Gaddafi’s rule, particularly through the use of arbitrary detention.

British Foreign Secretary William Hague said he would raise the issue at a meeting later in the day with the head of the NTC in Tripoli. “It’s very important they keep the moral authority by treating people well,” Hague told reporters.

The often chaotic struggle for Sirte has killed scores of people, left thousands homeless and laid waste to much of what was once a showpiece Mediterranean city where Gaddafi entertained foreign leaders. (Additional reporting by Rania El Gamal and Tim Gaynor in Sirte, Suhaib Salem and Yasmine Saleh in Tripoli; Writing by Joseph Nasr and Jon Hemming; Editing by Mark Heinrich)