* Clashes erupt in Zawiya town
* Oil port safe despite fighting
* Islamists reject parliament's sessions
By Aziz El Yaakoubi
TRIPOLI, Aug 7 (Reuters) - Clashes in Libya spread from Tripoli to the western town of Zawiya near Tunisia's border, where a large oil port is located, killing four people over the last two days, local town council officials said on Thursday.
Foreign governments have mostly closed their embassies and evacuated staff after three weeks of clashes turned Libya's two main cities - Tripoli and Benghazi - into warzones in the worst fighting since the NATO-backed war against Muammar Gaddafi.
Three years after Gaddafi's fall, Libya's government has been unable to tame rival brigades of former rebel fighters who have allied themselves with competing political factions in a struggle over post-war spoils.
The fighting in Zawiya is part of a broader struggle between two loose confederations of former rebels and their political allies whose rivalries have exploded into street battles that have killed more than 200 people in the past three weeks.
Brigades allied to town of Zintan - based in the city some 130 km (80 miles) southwest of Tripoli - and their anti-Islamist Qaaqaa and Al-Sawaiq units are battling Islamist-leaning Libya Shield brigades loyal to the central, coastal town of Misrata who say they are fighting former Gaddafi allies.
"Four people were killed and nine others were wounded when Warshafana militias (from Zintan) allied with Qaaqaa and Al-Sawaiq brigades attacked Libyan Western Shields," Zawiya council's president Abdelkarim Salem al-Beh said.
"Libyan Shields have been protecting the main coastal road to the Tunisian borders," he said.
Another local security official confirmed clashes between fighters loyal to Warshafana against the Libya Shield brigades.
But Zawiya's port, a major terminal that is fed by the El Sharara oilfield, was safe, its managing director said.
"The clashes are around 20 kilometers from the port. The port is operating normally, and at least one tanker leaves everyday exporting oil," Youssef Hamza, managing director of Zawiya port told Reuters.
Zawiya port is connected to El Sharara in the southern desert and its pipelines started operating a few months ago after months of blockades by armed protesters.
"All fuel depots for domestic consumption and for exports are full, and all tankers load once they arrive," Hamza said.
Libya's oil output dropped to about 450,000 barrels per day (bpd) from 500,000 bpd last week, but a spokesman for the state-run National Oil Corporation said oilfields were still secure despite clashes in the capital Tripoli.
Libya's oil infrastructure has been targeted repeatedly since 2011 by armed groups, tribes and protesters who have taken over fields, blockaded ports or switched off pipelines.
On Thursday Tripoli was quieter than for days after weeks of clashes as Misrata brigades try to oust Zintan fighters from Tripoli airport, which they have held since Gaddafi's overthrow.
Sporadic gunfire persists in the eastern city of Benghazi, where the self-declared Revolutionaries Shura Council, an alliance including former rebels and militants from the al Qaeda-linked Ansar al-Sharia, has been fighting regular forces.
The fighting is also shifting to the political arena.
The new House of Representatives, elected in June, on Wednesday called for an immediate ceasefire under United Nations supervision. But Libya's Islamist Justice and Construction party, an arm of the Muslim Brotherhood, has rejected the House of Representatives sessions held in the eastern town of Tobruk, away from the fighting.
Already some Islamist-leaning lawmakers and former parliamentary deputies allied with the Misrata brigades involved in Tripoli clashes have rejected the new parliament as unconstitutional because it held sessions in Tobruk.
"We urge lawmakers to reconvene again to salvage the country's transition to democracy and hold their first meeting in the city of Benghazi," a party statement said on Thursday. (Additional reporting by Ahmed Elumami in Benghazi; Editing by Patrick Markey and Louise Ireland)
Our Standards: The Thomson Reuters Trust Principles.