TRIPOLI/TUNIS Deep in Libya's southern Sahara, tribal sheikhs crowded into a Bedouin tent last month to declare their remote province bordering Algeria would break away from the government in far-off Tripoli.
A thousand miles to the east, armed protesters had seized ports disrupting oil shipments into the Mediterranean in support of local activists who appointed a de facto prime minister.
Prime Minister Ali Zeidan's Libya sounds like a country on the verge of splitting into a jigsaw of rebellious enclaves each with their own government, militias and, importantly, their own share of OPEC member Libya's oil.
This weekend's U.S. military raid to snatch a top suspected al Qaeda operative from Tripoli only underscored how Libya's turmoil may make it easier for Islamist militants to find safe haven there.
Two years after civil war ended the 42-year rule of Muammar Gaddafi, federalist ambitions complicate Zeidan's fragile control over former rebels still jostling for more power.
His challenge is clearest in the east, where protesters claiming to protect Libya's oil from corrupt elites have closed ports, dug in and threatened to sell oil independently for their Cyrenaica region, long an anti-Gaddafi stronghold.
There, the main city Benghazi has already set up its own council demanding to run local affairs, and called for state oil company NOC to return to an area that was once Libya's economic heartland.
"The government and congress exploit Libya's wealth and use it to serve their agendas," said Ibrahim al-Jathran, the former head of an oil protection security unit who defected and seized eastern ports as a self-styled federalist chieftain.
Yet as chaotic as Libya appears, it is far from partition or from taking the path of Iraq, where federalism splits oil revenue between Baghdad's Arab-led government and a Kurdish enclave that runs its own administration and armed forces.
Rather than a widespread popular movement, Libya's autonomy protests have grown out of Tripoli's lack of control, tribal loyalties and a series of unresolved local grievances over security, corruption and poor services that have festered since the 2011 revolution.
Independence declarations by Cyrenaica and more recently by the southern Fezzan region change little on the ground politically, analysts say, as they have no mass support for now, and carry no authority under Libya's transitional arrangement.
But the risk is that such demands could drive Libya deeper into chaos, with a weak government paralyzed by inertia and armed militias with little popular support holding Tripoli to ransom by shutting down oil in the name of federalism.
That scenario has already drawn comparisons to Nigeria, where militants with the Movement for the Emancipation of the Niger Delta (MEND) have attacked oil installations, kidnapped foreign workers and siphoned off crude for sale under the banner of fighting for the oppressed people of the Niger Delta.
Without a clear central government response, Libya may still slowly fragment with competing regions and cities, loyal to rival tribal and ethnic groups, vying for control of local oil and gas resources.
"They are trying to use this power as a bargaining tool with the state. They want to disrupt the current political process and to do so they threaten to break off from Libya," said International Crisis Group's Claudia Gazzani.
"Whether this becomes an armed confrontation that leads to greater autonomy depends very much on how the government responds to these peoples' demands."
EAST MOST PROBLEMATIC
Libyan federalists play upon old divisions dating back to before Gaddafi came to power in 1969. They point to 1951 when power was devolved to Cyrenaica, the southern province of Fezzan, and Tripolitania in the west.
A shaky central government's failure to wrest control from rival militias and provide security in most parts of Libya, and even over parts of Tripoli, only feeds federalist ambitions.
The east's Benghazi was the cradle of the uprising against Gaddafi with long-held grudges its people were mistreated and have since not seen their share of post-revolution spoils.
Libya is still without a new constitution. It must be drafted by a committee chosen from the three regions, who will have to account for rival federalist claims, tribal demands and ethnic pressures.
Iraq, in contrast, already has a federal system that calls for autonomous Kurdistan to ship its oil through the central government's pipelines and in return receive a percentage of the federal budget, although unresolved tensions remain.
"Kurds are a majority in Kurdistan. As for Libya, whether in the south or the east, those demanding autonomy are small groups," said Hadi Belazi, director of Petro Libya, a Tripoli oil services company. "In Libya, in some cases 10 or 15 people can close a pipeline and it's not ... even a whole tribe."
The federalists do not have widespread support for full autonomy, and often appear to use federalism more for leverage against Tripoli, according to analysts, local officials and diplomats.
Southern Fezzan's tribes declared autonomy two weeks ago but rivalries between groups who backed Gaddafi and those who opposed him would scuttle that proposal, say locals, even if discontent with Tripoli was strong.
"Fezzan is a source of gas, water, farming and wealth that goes to the north and the capital. Not one nail has been hammered in here," said Khalil Mohammed, a nurse in a local hospital in Sabha town in Fezzan.
In the more populated west, demands of the powerful Zintan tribe, who had shut the major El Feel and Sharara oilfields, were addressed by pay increases, managing local concerns and by promising more cash for community projects.
"Federalism in the east is a more serious issue and is more plausible. But the amount of support is very limited and if the government can sort out security and spending money, I think federalism will fall away quickly," said one diplomat.
Yet, Libya's eastern area is far from under control. Benghazi, where militants attacked a U.S. consulate in 2012, remains chaotic. Turf warfare among rival militias is aggravated by a strong presence of Islamist hardliners in the city.
In the remote desert oil-producing areas, several thousand armed militiamen led by the federalist leader Jathran hold facilities that account for almost sixty percent of the country's oil wealth.
It is unclear how much support Jathran can draw upon for a real push for autonomy in the east, or whether he would end protests if Tripoli offered more concessions.
The central government has warned it could turn to force, but appears reluctant to confront the armed federalists. For the moment, his eastern oil protesters are keeping their hard line.
But starting exporting oil independently to market though the Mediterranean without any agreement with Tripoli will be tough for Jathran's men. The government has threatened to attack any tankers illegally exporting oil.
"One thing is certain, Jathran and his people will not be able to sell oil, nobody is interested," said John Hamilton at CBI, a business consultancy focused on Africa and energy. "That ship would be marked, this would be oil stolen from Libya."
(Additional reporting by Ghaith Shennabi in Tripoli; editing by William Hardy and Richard Mably)