* Lawmakers extend their term to 'avoid vacuum'

* Mandate was due to expire on Oct.20

* Move likely to alienate rival Tripoli faction

(Adds GNC unofficial reaction)

By Ayman Al-Warfalli

BENGHAZI, Libya, Oct 5 (Reuters) - Libya's elected parliament voted on Monday to extend its mandate, due to expire on Oct. 20, in a move likely to complicate U.N. attempts to end a crisis between the country's two rival governments.

Four years after the uprising that toppled veteran ruler Muammar Gaddafi, the oil-producing North African state is caught in conflict between its recognised government, with an elected parliament, and a rival self-declared administration. The two are backed by competing armed factions.

The United Nations has been negotiating a peace agreement to form a unity government. It had been pushing hard for a deal before the parliament's mandate ended on Oct. 20 to prevent the country falling deeper into chaos.

House of Representatives spokesman Faraj Hashem said the elected parliament had voted to extend its mandate until it could hand over power to a new elected body.

He told reporters the parliament, known as the HOR, was still supporting the U.N.-backed negotiating process and its delegates were in meetings with the U.N. envoy in the Moroccan city of Skhirat on Monday.

"The HOR has amended the constitutional declaration to extend its mandate to avoid a vacuum in the country," lawmaker Tarek Juroushi told Reuters.

There was no official reaction from the rival parliament, known as the GNC, and government. These have been established in Tripoli since an armed faction called Libya Dawn took over the capital last year, driving out the recognised government which now operates in the east of the country.

But the move is likely to complicate efforts to get the Tripoli factions to agree to a national unity government and control hardliners resisting a peace accord.

"What the HOR has done sends a negative message," one GNC member told Reuters asking his name not be used because the parliament's members planned to meet to discuss their official position.

Four years after the fall of Gaddafi, Western governments fear the struggle between the rival governments could turn the country into a failed state.

Each is backed by loose alliances of former anti-Gaddafi rebels, ex-soldiers, tribal factions and Islamist-leaning brigades, who once fought Gaddafi's forces but have steadily turned against each other.

(Additional reporting by Ahmed Elumami in Tripoli; writing by Patrick Markey; Editing by Mark Trevelyan) ((pat.markey@thomsonreuters.com; +21620349006; Reuters Messaging: pat.markey.thomsonreuters.com@reuters.net))

Keywords: LIBYA SECURITY/PARLIAMENT