By Ahmed Elumami

TRIPOLI (Reuters) - A Libyan faction opposed to the U.N.-backed government seized a building used by parliament in Tripoli, proclaiming its own authority and demanding a new government in a challenge to Western plans to end the instability in the country.

Libya's internationally backed government, which has struggled to impose its authority on rival factions, condemned the takeover of the Rixos Hotel as a bid to scuttle its attempts to form a stable government in the North African OPEC member.

Later on Saturday, the U.N.-backed government posted images on social media of its presidential council and ministers holding a meeting in the main offices of parliament in a different part of Tripoli.

The United Nations and European Union warned against attempts to create parallel institutions and reiterated their backing for the U.N.-negotiated deal that formed a Government of National Unity (GNA) in Tripoli.

Since the fall of Muammar Gaddafi in 2011, Libya has been caught up in factional fighting between various groups of former rebels who battled Gaddafi and then steadily turned against each other in a struggle for control.

The presidential council of the GNA arrived in Tripoli in March in the latest attempt to bring together factions who operated competing governments in the capital and in the east of the country since 2014.

Tripoli was calm on Saturday hours after leaders of a former Tripoli government said they had taken over the Rixos in the capital, where part of the U.N.-backed government is supposed to operate. The hotel was already controlled by an armed group loyal to them.

"The presidential council was given chances one after another to form the government, but it fails... and has become an illegal executive authority," former premier Khalifa Ghwail said in a statement late on Friday.

Ghwail called for a new administration to be formed by his former Tripoli government and its rival in the east, where hardliners also oppose the U.N.-backed administration. He said all institutions including banks, the judiciary and local authorities were under their jurisdiction.

There appeared to have been no fighting in the takeover of the Rixos, which was supposed to be the base for the State Council, a legislative body made up of Tripoli's former parliament as part of the U.N.-backed unity government deal.

Traffic was flowing as normal around the Rixos on Saturday, where around 10 military vehicles secured the perimeter.

"The seizure of the state council is an attempt to hinder the implementation of political agreement by a group which rejects this deal after it has proved its failure in managing the state," the presidential council said in a statement.

Tripoli is controlled by various armed brigades, some loyal to the GNA and others who backed the former National Salvation government when its forces took over the capital in 2014 in fighting that destroyed the international airport.

Brigades of former rebels have often stormed government offices, ministries and the parliament in the last five years to make political demands or call for higher salaries.

Challenging the GNA's authority in the capital poses a risk to Western plans for Libya's unity government to stabilise the country and help fight Islamist militants and migrant smugglers.

Eastern factions led by former General Khalifa Haftar are also opposed to the U.N.-backed Tripoli government. But they fought a conflict with rivals for control of Tripoli in 2014. Haftar's forces have taken over four key oil ports and now are cooperating for the moment with the GNA in allowing oil exports.

(Reporting by Ahmed Elumami; Writing by Patrick Markey; Editing by Jeremy Gaunt and Hugh Lawson)