(Adds details, background)
By Feras Bosalum
TRIPOLI, July 17 (Reuters) - Air controllers in western Libya have gone on strike to protest the shelling of Tripoli's main airport, halting flights in much of the oil-producing country, a government official said on Thursday.
The strike puts pressure on rival militias to end four days of heavy fighting over control of the country's biggest airport, during which at least 20 aircraft have been damaged in the worst violence in the Libyan capital for six months.
The Tripoli air controllers refused to go to work at the control tower in Tripoli, which regulates traffic for all of western Libya, said Tarek Arwa, a spokesman for the transport ministry.
Authorities had closed Tripoli International Airport after militias coming mainly from the western city of Misrata attacked on Sunday the airport area controlled by a rival militia from Zintan in the northwest, part of growing turmoil in the North African country.
On Wednesday, Libya reopened the western Misrata airport, which also had been closed after the airport attack, but it will have to close again due to the strike because Tripoli air controllers are also responsible for Misrata, Arwa said.
The weak Libyan government has no control over former rebel fighters who helped topple dictator Muammar Gaddafi in a NATO-backed uprising but now defy state authority and often battle for political or economic power.
The airport fighting has halted flights, stranding abroad many Libyans who were planning to return home for the Muslim fasting month of Ramadan and trapping expatriates. The heavy fighting in Tripoli and clashes in the eastern city of Benghazi prompted the United Nations to pull its staff out of the North African country. (Reporting by Feras Bosalum; Writing by Ulf Laessing; Editing by Ken Wills and Lisa Shumaker)