Workers are seen next to pipelines at the Zueitina oil terminal in Zueitina, west of Benghazi, Libya. Reuters

Libya officially asked for the international community to help the country from falling into the hands of extremists, at an emergency meeting of the Arab League on Thursday. For months the internationally recognized government has been fighting Islamist militias in the North, but this week the violence escalated, killing dozens of civilians. The Libyan government is now calling for weapons to be sent to the country to help aid in the fight -- but the problem is that Libya is under an arms embargo, and it's not clear who would get the weapons.

"We call on the international community to assume its legal and moral responsibilities and to arm, without further delay, the Libyan army," said Libya's representative to the Cairo-based Arab League, Ashur Bou Rashed.

But in order for the international community to legally help the Libyan government and supply it with arms, the United Nations would need to formally lift the arms embargo that has been in place since February 2011. The Security Council passed a resolution that prohibited the supply of arms and military equipment to and from Libya, because of human rights abuses during the 2011 revolution.

The militias that ousted dictator Muammar Gadhafi are now divided into armed factions, embroiled in the deadliest fighting since that revolution. Intense clashes are taking place in Misrata, Benghazi, Tripoli and Tobruk, the city where the internationally recognized government is based. An Islamist group known as Libya Dawn took control of the capital Tripoli in August and set up a rival government, forcing the internationally recognized government to flee.

Libya's House of Representatives, as the internationally recognized government is known, declared a formal alliance with rebel Gen. Khalifa Hifter last month. Hifter supported Gadhafi when he was a high-ranking officer in the army, but turned against the Libyan ruler in the 1980s during the war with Chad. He is now the head of a militia that supports moderate values against radical Islam in a campaign called Operation Dignity.

It is not known how many troops Hifter leads, but his forces are said to own heavy weaponry and aircraft that could help the government fight Islamist militias. The Libyan National Army is led by Hifter, but it is not clear if Hifter (whose name is sometimes transliterated as Haftar, among other spellings) is in control of the Libyan air force, which has been accused of launching dozens of airstrikes across the country over the last two weeks.

Libya is also facing an insurgency by the Islamic State group, also known as ISIS or ISIL. ISIS militants operating in Libya claimed Thursday to have executed two Tunisian journalists who were kidnapped in September, according to local media reports. ISIS in Barqah Province near Derna published photos of what they said was the execution of Sofien Chourabi and Nadhir Ktari.

An ISIS presence first emerged in Libya in September, when Sunni militias associated with al Qaeda in the Islamic Maghreb pledged allegiance to the group and consolidated power in the eastern city of Derna. It was the first city outside of Iraq and Syria to have a recognized ISIS presence.

The increased violence has damaged the oil infrastructure in the country, severely limiting production and causing the economy to decline. Reuters reported this week that the Libyan central bank is burning through its foreign reserves and government services are being cut because of the poor economy. The decline in the global price of crude is also not helping, and oil exports have fallen below 300,000 barrels a day compared to the 1.6 million barrels the country was pumping before the 2011 revolution.

French president François Hollande said Monday that France was ready to intervene in Libya, but only if there was a clear United Nations mandate.

"We are making sure to contain the terrorism that took refuge there, in southern Libya. But France will not intervene in Libya because it's up to the international community to take its responsibility,'' Hollande told France-Inter radio in an interview. According to an Al Jazeera report, France is already setting up a military base in northern Niger, about 60 miles (100 km) from the Libyan border.

United Nations envoy to Libya Bernadino Leon met with officials in Libya, including Hifter, on Thursday to begin discussions on the deescalation of violence. The U.N. did not offer any official statement on the meetings.