* Militia violence in Tripoli for second time this week
* Post-Gaddafi government struggles to control fighters
* Oil output mostly closed by strikes, armed protests (More details, colour, background)
By Ghaith Shennib and Feras Bosalum
TRIPOLI, Nov 7 (Reuters) - Rival militiamen battled each other for hours with anti-aircraft guns and grenades across Tripoli on Thursday, killing at least one person and wounding 12 in the worst fighting for months in the Libyan capital, medical sources said.
The second outbreak of street fighting within days shows how the government is struggling to contain militias which helped overthrow Muammar Gaddafi two years ago but kept their guns after the NATO-backed uprising.
A security source told Reuters that a heavily-armed group from the central city of Misrata had entered the capital in the evening to take revenge for the killing of one of its fighters in a smaller shootout in Tripoli on Tuesday.
Gunfire broke out while young people were enjoying a water pipe on the seafront and families were shopping or dining at the start of the weekend.
Toyota trucks mounted with anti-aircraft guns arrived in several parts of Tripoli, opening fire as they tried to storm the eastern Suq al-Juma district, witnesses said. Panicked diners ran for cover, while drivers abandoned their cars.
One woman was shot in the leg, a medical worker said. The Radisson Blu, one of Tripoli’s best hotels, evacuated some guests after windows in the reception area were smashed by stray gunfire, an employee said.
Rival militiamen fought back, firing rocket-propelled grenades (RPGs) from a bridge. Heavy shooting could be also heard in at least three other districts close to the foreign ministry, state television building and embassies.
The conflict started on Tuesday when rival gunmen battled for almost four hours. Three people were wounded and one, a leader of a Misrata militia, later died - prompting the revenge attack as news of his death spread on Facebook.
A militia on government payroll had initially arrested the driver of a car without number plates and detained him briefly in a security office in Suq al-Juma. He later came back with friends in armed militia cars, triggering clashes.
As fighting spread through the capital, residents carrying guns and RPGs rushed out of their houses searching for the attackers. Others set up several checkpoints to stop more militiamen entering central parts of Tripoli.
“They’re stopping any car from Misrata,” one resident told Reuters, while anti-aircraft rounds flew overhead.
Fighters in a Toyota truck mounted with an anti-aircraft gun shouted “Allah Akbar” (God is great) while driving at great speed near the foreign ministry.
In the Suq al-Juma area, residents tore down street lamps to build makeshift barricades to prevent more militiamen entering the area, witnesses said by telephone.
Libya’s government is finding it harder to contain former fighters and Islamist militants in a country awash with weapons.
Prime Minister Ali Zeidan has sought to co-opt militia that helped topple Gaddafi by integrating them and their weapons from the NATO-backed revolt into the nascent army and police. But in practice, most continue to report to their own commanders or tribes.
Strikes and armed protests by militia and tribal gunmen demanding payments or political rights have also shut much of the OPEC member’s oil output for months and deprived the government of its key source of income. (Additional reporting and writing by Ulf Laessing; Editing by Robin Pomeroy and Paul Simao)