Tripoli, Libya - Just off of Rashid Street in Tripoli's downtown, with its grimy cluster of shops selling a black market mix of cheap Turkish-made guns and bullets, Jamal, a mobile phone store owner, laments the deterioration of Libya's security.

"Everyone has a gun now," he says, after jokingly asking one customer if he belonged to Daesh, the Arabic name for the Islamic State of Iraq and the Levant (ISIL), which claimed responsibility for executing 21 Christian Egyptians on a Libyan beach on Sunday. "Before the revolution no one had a gun, and it was peaceful. Now there is a lot of violence and business is bad."

February 17 marks the fourth year since the official start of the Libyan revolution, which ended in the brutal overthrow of former dictator Muammar Gaddafi's regime in October 2011. The following year, euphoria swept through Libya as revolutionary fighters, activists, government workers, businesspeople, students and their families celebrated being free of a controlling state apparatus that had spanned four decades. Exiled Libyans jubilantly returned home and the world's media flew in to witness Libya's first democratic national elections.

But behind the optimism were ominous signs the state was slowly spinning out of control.

RELATED: Q&A: Libya crisis explained

Benghazi, where the revolution initially started, demanded a bigger voice in government. Under a weak transitional leadership, weapons from Gaddafi's stockpiles were plundered and smuggled across borders, and heavily armed militias proliferated.

While ministry heads were changed, most government staff remained in lifelong positions and corruption marred the massive financial payouts to revolutionary fighters and people wounded in the war.

Meanwhile, the destruction of religious shrines occurred in broad daylight, and local media, activists and NGOs were gradually silenced by mounting threats, attacks and disappearances.

"The best year was just after the revolution - everyone was active," Mona, a 23-year-old graphic designer, told Al Jazeera. "We all wanted to make our country better. Now that feeling is gone. There is no change; in fact, things are worse. You can't speak out politically, and there are a lot of guns. If men get into a fight, they do it with guns."

The emergence of ISIL has had some effect in Libyan militant circles. It is causing tensions within those groups aligned with al-Qaeda, like Ansar al-Sharia in Benghazi, Derna and Sirte, as some youth are peeling away from these groups and joining ISIL. Mary Fitzgerald, analyst and author

Now Libya is bitterly split. It has two opposing governments, parliaments and fighting forces, intent on seizing the country's power and assets.

There is Prime Minister Abdullah al-Thinni's Tobruk-based government and House of Representatives, backed by General Khalifa Haftar and his "Operation Dignity" or "al-Karama" military campaign. Although the Libyan Supreme Court ruled this parliament to be illegal and unconstitutional last November, it is recognised by the US, the European Union, Egypt and the UAE.

Their opponents are Prime Minister Omar al-Hassi's government and the "Libya Dawn" or "Fajr Libya" forces, which seized control of Tripoli after fierce fighting for control of the city's airport last year.

Ignoring the diverse makeup and increasing splits within each political coalition, al-Karama simplistically brands its Fajr Libya opponents as "Islamic extremists", while the Fajr Libya alliance wrongly condemns all foes as "former Gaddafi loyalists". They are fighting each other in Benghazi, the Sidra oil basin, the west and, by proxy, the southern town of Ubari.

OPINION: What is left of Libya?

The UN estimates 400,000 Libyans have fled their homes to escape the fighting, while the unofficial website Libya Body Count estimates 2,825 people were killed last year.

Complicating Libya's political landscape further are armed groups claiming allegiance to ISIL leader Abu Bakr al-Baghdadi, including the fighters controlling the eastern town of Derna. Last week, fighters claiming affiliation to ISIL took control of key assets in Sirte, Gaddafi's old hometown.

"The emergence of ISIL has had some effect in Libyan militant circles," said analyst and author Mary Fitzgerald, who has been based in Libya for the past year. "It is causing tensions within those groups aligned with al-Qaeda, like Ansar al-Sharia in Benghazi, Derna and Sirte, as some youth are peeling away from these groups and joining ISIL.

"Since last summer, some opponents of the Fajr Libya coalition have tried to paint it as in cahoots with ISIL. This has fed the tendency for Fajr Libya to deny or downplay ISIL involvement, as they see it as a political tool to smear them," Fitzgerald told Al Jazeera. "Meanwhile, the real threat is growing. Libya's political power struggle is complicating efforts to address the threat."

Many Libyans consider the ongoing UN-brokered peace process, initially based in Geneva, as the only alternative to the ongoing fighting, but a weak one.

"The fragmentation of the two opposing factions at the Geneva talks is undermining the dialogue," said Claudia Gazzini, an analyst with the International Crisis Group. "The negotiating parties need to discuss the issue of legitimacy of both governments and come up with an agreement. They also need to discuss what powers a Libyan head of state will have, which includes the armed forces."

With nearly all of Libya's oil fields and terminals attacked or closed, the country is producing an estimated 160,000 barrels of oil per day, down from its post revolutionary peak of 1.5 million barrels per day, according to analyst Richard Mallinson of the UK-based consultancy Energy Aspects.

The country is importing around 75 percent of its fuel for domestic use, and chronic cash shortages, unpaid government salaries, electricity cuts and soaring gasoline and food prices are exacerbating miserable living conditions for Libyans.

"The threat to the oil infrastructure is dramatically worsening," Mallinson told Al Jazeera. "There is a new paradigm emerging that is very negative. The groups declaring allegiance to ISIL will not be willing to participate in the UN process, and they are more willing to attack infrastructure and towns."

Meanwhile, for the badly battered eastern city of Benghazi, off the international community's radar, the war grinds on while its residents live in abject misery. Medical workers estimate 600 people died in the past three months. "Everyone knows someone who has been killed - whether a cousin, a neighbour or a friend," said local journalist Abdul-Hamed Amrooni.

"When Benghazi became free in the revolution, we were so happy. We had dreams, and we wanted to live our lives like others on this planet," Amrooni told Al Jazeera. "But now we are very disappointed. Our life is very dangerous. The situation is just terrible."