MISRATA, Libya — A gun battle broke out Friday between supporters and opponents of ousted leader Moammar Gadhafi in some of the worst political violence in the Libyan capital since his government was toppled two months ago.

Truckloads of revolutionary gunmen clutching automatic rifles roared off to the Tripoli neighborhood of Abu Salim after reports emerged of a group of armed people there waving the green flag of Gadhafi’s government.

Although authorities said the clash proved relatively minor, it unnerved residents still fearful of Gadhafi, whose repressive rule lasted 42 years and who remains at large. The sound of semi-automatic fire echoed across the city, and reports spread of gunfights in other areas of the city.

“Gadhafi’s still alive, so the world is still in danger,” said Col. Ahmed Bani, spokesman for Libya’s new Defense Ministry.

Officials and witnesses offered varying versions of how the conflict began. Col. Ahmed Barati, head of the country’s military police, said authorities had received intelligence Thursday of a planned attack by Gadhafi loyalists in Abu Salim, one of the last neighborhoods to fall to the rebels in August. He said a group of Gadhafi supporters were waving green flags and firing weapons when forces supporting the new government arrived.

The Associated Press quoted a witness who gave a somewhat different version, saying snipers opened fire on revolutionary forces after they arrived at the protest, triggering the battle. The anti-Gadhafi forces discovered weapons on the rooftops of buildings on the street, the news service said.

Reuters news service said a revolutionary soldier plunged a knife into the back of one man dragged out of an apartment building in Abu Salim, who had been captured holding a rocket-propelled grenade launcher.