by Sarah Lynch, Special for USA TODAY

by Sarah Lynch, Special for USA TODAY

CAIRO - On an evening in mid-March, U.S. Navy SEALs plied through Mediterranean waters on an inflatable boat and boarded a hijacked tanker. By the end of the two-hour operation, the commandos had stopped anti-government Libyan rebels from stealing the ship's oil.

In the three years since the uprising that overthrew long-time dictator Moammar Gadhafi, Libya's central government has failed to secure its oil ports, pipelines and fields, disrupting its primary revenue source. The battle for oil wealth in the increasingly lawless land reflects the turmoil that wracks the country in these post-revolutionary times.

In fact, the State Department recommended Tuesday that Americans leave Libya immediately, saying the security situation in Libya "remains unpredictable and unstable" with crime levels high in many parts of the country.

"U.S. citizens currently in Libya should exercise extreme caution and depart immediately," the department said in a statement.

"The problem that Libya is going through right now is a war for power," said Rawad Radwan, a Libyan blogger who lives in the capital, Tripoli. "Everyone wants to gain power, and they all believe that whoever controls oil will rule the country."

Earlier this month, renegade Libyan general Khalifa Hifter launched a bloody military offensive in the east to crush Islamist extremists. On May 18, the general's allied militias attacked parliament in the capital to try to unsuccessfully force the legislature to disband.

Over the weekend, the embattled parliament approved an Islamist-backed government led by Prime Minister Ahmed Maiteeq despite boycotts from non-Islamists and Hifter's complaints that the parliament is illegitimate.

Also, over the weekend, thousands of demonstrators gathered in cities across Libya to show support for Hifter, who later claimed the protests gave him a mandate to fight terrorism.

Broader conflict now looms as militias once united to overthrow Gadhafi are rallying behind opposing political sides. On May 20, Libya's election commission set June 25 for a parliamentary election in hopes of dampening the unrest through a vote that would give lawmakers clear legitimacy.

"Liberal forces in Libya are convinced that the reason for Libya's woes today is this current parliament," said Claudia Gazzini, a senior Libya analyst at the International Crisis Group. "And they're confident that new elected parliament would show that Libya's public is more liberal-leaning than Islamist-leaning."

Upheaval in the North African nation dates to the 2011 uprising against Gadhafi, who imposed one-man rule for 42 years. When he was killed following months of civil war, the nation lacked institutions or cohesive opposition groups to oversee a democratic transition.

"What you had in Libya was many different parties that rallied to overthrow Gadhafi, but once he was overthrown, these different factions, different regional power centers turned on each other," said Libya expert Frederic Wehrey, a senior associate at the Carnegie Endowment for International Peace in Washington, D.C. "They're now competing for the spoils of the revolution."

Much of the tension stems from a backlash against Islamists and frustration with the weak legislature, which is comprised of a slim Islamist majority and accused of doing too little to rein in extremist militias, who gun down soldiers and policemen almost daily.

Rebels are blockading oil in the east to pressure central authorities to fulfill rebel demands that include distributing oil revenues across the country's three regions, said Osama Buera, a leader of a rebel movement that seeks autonomy for Libya's eastern region. But after the failed attempt in March, he said, the rebels there are no longer trying to sell the oil.

Effective police and army forces are non-existent, leaving authorities little means of asserting control. The government has instead paid militias to ensure security.

"To be fair, right after the war, there was no other option," Radwan, the blogger, said. "But we just wasted three years for nothing. We heard a lot about engaging them in the army, engaging them in the police. But that did not happen."

Now the militias â?? some with al-Qaeda-inspired views â?? are prime sources of violence. And they're proving increasingly powerful with the help of weapons seized from Gadhafi's arsenals during the uprising against him.

"Anyone with a group of militia fighters, with a bunch of guns, can essentially push through any legislation they want," said Sumedha Senanayake, a Middle East and North Africa analyst at iJET International, a private intelligence firm. "At this point, democracy is pretty much a fallacy in the country."

"The instability of it all is what people are so sick and tired of," said Assia Amry, 25, a Libyan American living in Tripoli. "People feel like everyday life is hostage to these gang wars and these militia wars.

To solve its worsening problems, Libya needs political reconciliation and better security to safeguard its oil, analyst Wehrey said. "The Libyans own their revolution and they own the aftermath, and we have to give them a chance to sort this out."