* Ports trouble based on regional demands emerging elsewhere
* Prime minister under pressure and legislature deadlocked
* Muslim Brotherhood gaining, but Libya split in many ways
By Tom Heneghan
TUNIS, Aug 23 (Reuters) - The regional unrest blocking Libyan oil ports is a microcosm of the disarray plaguing the country and sapping the authority of Prime Minister Ali Zeidan's shaky central government, Libyan and foreign analysts say.
While local autonomy activists have been holding ports in the east, the legislature in the capital Tripoli in western Libya has been full of talk of voting no confidence in Zeidan.
The Muslim Brotherhood seems to be gaining influence amid the crises shaking the country, the analysts say, and the army ousting of Egypt's Islamist government may have prompted some Libyan radicals to step up violence against secular critics.
The Brotherhood and more radical Islamists active in several countries across the region bring a politicised form of Islam that is foreign to the area's traditional religious practices.
But Libya is so split along political, regional and tribal lines two years after the toppling of Muammar Gaddafi that no one group can effectively take control, they said.
Even factors as visible as the state of security in Tripoli are so fluid that residents cannot agree about them. "It's improved," one told Reuters by telephone. "It was pretty bad last week, with lots of attacks," another reported.
"Libya is essentially beholden to local and regional interest groups," said Henry Smith of the Control Risks consultancy group. "The government doesn't really have the coercive capacity to be able to stop them."
The ports blockage, a major factor in a 70 percent drop in Libya's oil exports, stems mostly from regionalists aiming to seize control over oil revenues to benefit the autonomous area they want to establish in the eastern region of Cyrenaica.
The region, centred around Benghazi, has traditionally been a rival to Tripoli in the west and the ports blockage has been the most dramatic step regionalists have taken to press their demands for regional control of the oil riches.
"They're talking about a federal way of running the country," said Salah Gaouda, vice chairman of the Tripoli parliament's national security committee. He declined to discuss this political aspect of the standoff.
Regionalist sentiment has also stirred in the southern region of Fezzan, where local tribes who accuse Tripoli of underfunding them have begun calling for autonomous status too.
The legislature, or General National Congress (GNC), can hardly deal with these challenges because it is deadlocked in a standoff between its largest bloc, the secular National Forces Alliance, and the second-largest led by the Muslim Brotherhood.
The Alliance is officially boycotting the GNC but sometimes attends sessions, leaving Libyans confused about what is happening in their national assembly.
Tripoli analysts also report uncertainty about Zeidan's future after GNC members seemed ready to call a vote of no-confidence. Zeidan's deputy prime minister and interior minister both quit this month in disagreement with him.
On Tuesday, Zeidan told the GNC he would not resign and they would have to vote him out. "Other names to replace him were mentioned, but nobody came forward," said a Tripoli analyst who asked not to be named. "There was no vote."
RISE IN VIOLENCE
Another Libyan expert, who also requested anonymity, said the Muslim Brotherhood's Justice and Construction Party had grown in influence in the GNC since the Alliance boycott began.
"The GNC is losing its legitimacy," he said.
GNC President Nouri Abusahmain, an independent member, has boosted Brotherhood influence in Tripoli by bringing in men from the so-called Libyan Shield militia to boost security in the capital after a wave of violence there.
"They are mostly from Misrata and under the command of a Muslim brother," the expert said.
With no effective army or police, Tripoli's security is tested by rival militias that often clash with each other over control of parts of the city.
Benghazi, Libya's second city, has seen a rise in violence in recent weeks against secular political activists that seems to be partly stoked by Islamist forces there, both Smith and the Libyan expert said.
But Smith stressed this did not imply a larger coalition of interests in the east between the Muslim Brotherhood and the federalists, because the Islamists saw the latter as a source of division.
GNC security official Gaouda said escaped criminals were also targeting judicial officials and attacking court buildings, hoping to take revenge for their jailing and destroy any records of their time behind bars.
The Libyan expert expressed fears the growing influence of the Muslim Brotherhood and other Islamists could lead to the emergence of a jihadist zone near the Egyptian border that fugitive Egyptian Islamists could use as a base against their homeland.
Smith thought local tribes would oppose any "rear base", such as Egyptian militants seem to have established in the Sinai region, because that could lead to the closing of the border with Egypt they want to keep open for trade.
The risk analyst said many Libyans hoped that Tripoli could exert more control once a new constitution was finally drawn up, but he said more work would be needed.
Libya's instability "will probably persist beyond having a constitution", he said. "People need to regain faith in the state, the state needs to reassert itself in some way, and all that is going to take a lot of time." (Editing by Alison Williams)