(Death toll, details, context)
By Feras Bosalum and Ulf Laessing
TRIPOLI, July 13 (Reuters) - Heavy fighting broke out between rival militias vying for control of Libya's main airport on Sunday, killing at least three people and forcing a halt of all flights in the worst fighting in the capital for six months.
Explosions and anti-aircraft gunfire were heard from early morning on the airport road and other parts of Tripoli.
Residents said that Zintan militiamen who had controlled the airport came under fire and local TV footage suggested that the attacking rebels were from the western city of Misratis.
The fighting is part of growing turmoil in the North African oil producer where the government is unable to control battle-hardened militias who helped to overthrow Muammar Gaddafi in 2011 but continue to defy state authority.
Many Libyans are weary of militias whose members theoretically work for the government but who in reality appear to do as they please -- fighting each other or seizing oilfields and ministries as they press their own financial and political demands on authorities.
Zintan forces from the northwest, which have controlled the airport since Gaddafi's ousting, and Misratis had been put on the state payroll in an unsuccessful attempt by the government to win their cooperation and establish the rule of law.
At least three people have been killed and eleven wounded in the current clashes, medics at Abu Salim hospital said.
Local news channel al-Nabaa showed men in military vehicles with Misrata insignia opening fire with heavy weapons.
Smoke could be seen rising above the airport as an official said: "All domestic and international flights have been halted."
Nabaa TV showed a Libyan Airlines plane and a transport aircraft engulfed in smoke while vehicles fired anti-aircraft volleys and fighters took up positions next to field of sheep.
Social media websites said that several rockets had hit the airport perimeter. Photographs on Facebook showed thick smoke at what was said to be the parking lot in front of the terminal. Families were trapped inside the building, local websites said.
The fighting was the worst in the capital since more than 40 people were killed in clashes between militias and armed residents in November.
Tripoli has seen a spike in kidnappings but has been mostly spared the kind of violence that has rocked the eastern city of Benghazi where clashes between forces of a renegade general and Islamists occur almost daily.
The violence comes as the country awaits the results of the June 25 parliamentary elections. Officials and Libya's partners had hoped the vote would give a push to state building and ease political tensions.
The OPEC member is divided between rival militias from urban communities and tribes, as well as Islamist and more moderate forces.
Oil production has fallen to a fraction of the 1.4 million barrels a day that Libya produced before July 2013 when a wave of protests erupted at oilfields and ports.
The loss of oil revenues has sparked a budget crisis as Libya depends on energy exports. (Reporting by Feras Bosalum and Ulf Laessing; Editing by David Goodman and Lynne O'Donnell)
Our Standards: The Thomson Reuters Trust Principles.