When Libya declared its independence as a constitutional monarchy under King Idris Sanusi on December 24, 1951, it became one of the first former European colonies in Africa to gain independence and achieve autonomy through the United Nations.

The United Kingdom of Libya, as it was officially known back then, consisted of three provinces: Tripolitania in the west, Cyrenaica in the east and Fezzan in the south. Each province had its own regional government, but they were united as one country under a federal system.

Initially, the newly formed Libyan state was very poor, had nearly no infrastructure to base its development on and was relying heavily on UN aid to feed its population. But only 10 years later, the discovery of oil transformed the country considerably and made it one of the region's most prominent oil produces.

But Libya's new-found riches also brought about new problems. International oil producing companies were not happy with the country's federal structure and demanded to deal with a single central authority rather than several local governments when doing business with the kingdom. As a result, Libya abandoned the federal system and unified its three provinces under a central government in 1963.

Ironically, almost 50 years after precipitating its transformation into a unitary state, Libya's vast oil resources are now a threat to its future and its unity. Over the years, the Libyans failed to strike a social contract that would guarantee the fair distribution of the country's wealth. Also, the regional powers that want to benefit from Libya's resources are refusing to stop interfering in the country's affairs. In the words of the former US ambassador to Libya, Deborah K Jones, "given its geography and energy resources, Libya matters too much for others to ignore it."

Chad and Sudan in the south

Following the February 2011 revolution, Libya entered into a state of transition and the last seven years have been characterised by instability and violent conflict in the country. There has not been a strong central authority that can maintain security and protect Libya's long borders (about 4500km with six neighbouring countries). As a result, foreign military interference and infiltration through the borders became almost a daily occurrence during this unstable period.

Foreign interference of this kind is most prominent in Libya's southern Fezzan region as the country's southern border with Niger, Chad and Sudan is some 1500km long, highly porous and has hardly any governmental control. This makes it very easy for foreign armed groups to infiltrate the area.

One of the groups that are active in this region is a Chadian rebel group called the Front for Alternation and Concord in Chad (FACT), which is believed to be fighting alongside local groups opposed to Khalifa Haftar. But Haftar has also relied on the support of foreign armed groups in the Fezzan region. For example, fighters from the Justice and Equality Movement (JEM), a Sudanese opposition group, are believed to be fighting alongside forces loyal to Haftar in this region.

Late last month, the situation in the Fezzan region escalated further when foreign fighters participated in clashes between local groups just outside the of Sabha.

Clashes between the fighters from the Sixth Brigade, an armed militia attached to Haftar's Libyan National Army (LNA), and rival fighters from the Tebu ethnic group left six civilians dead and wounded many others. According to media reports, several foreign armed groups were active in the fighting. The elected Mayor of Sabha, Hamed Al-Khayali told reporters that "There are Chadian and Sudanese fighters with their flags on attacking the Libyan Defence Ministry's Sixth Brigade in Sabha and they aim to control the city and the entire south." The Chadian forces were reported to have temporarily taken over key sites in the city.

But foreign actors are not only active in Libya's impoverished and conflict-ridden south, Libya's east is devastated by a slightly different form of foreign interference.

The UAE and Egypt in the east

In June 2017, a report by the UN's Libya Sanctions Committee revealed that the United Arab Emirates, as part of its ongoing support for Khalifa Haftar, was operating a military base in Libya's Al Khadim, about 100km east of Benghazi. This is currently the largest military base the UAE has outside its borders, and it allows the emirate to have a significant and permanent military presence in Libya. The Sanctions Committee report also established that the UAE has supplied attack helicopters and other military aircraft to the Libyan forces of Haftar, in violation of UN-backed international sanctions against the regime.

Haftar's LNA, which is aligned with the Tobruk-based House of Representatives and refuses to recognise the UN-backed government in Tripoli, has taken control of large swaths of territory in eastern and central Libya over the last couple of years, with significant help from the UAE.

But Haftar could not have established his military control without the support of Egypt as well, his other major Arab backer. Egypt, especially in the last four years, has provided Haftar's forces with "training and the delivery of all kinds of ammunition, weapons and military equipment, including attack helicopters and fighter jets". It has also launched direct air raids against strongholds of Haftar's opponents, especially in the city of Derna and elsewhere.

A divided Libya

The sad reality today is that Libyans are deeply divided along regional, tribal and political lines. Also, as result of continuous foreign interference, the country is de-facto divided into three parts, with each region battling with different but equally grave problems.

The supposedly legitimate and internationally recognised government is sitting in the capital Tripoli in western Libya. The east is completely under the control of Haftar's military, mainly as result of the military assistance provided by the UAE and Egypt. The south is effectively a no man's land with many foreign and local groups, including Haftar loyalists, jockeying for control. The increasing presence of Chadian and Sudanese armed groups, estimated in their thousands, is threatening to significantly change the demography of southern Libya and making it increasingly difficult for any Libyan central government to ever regain control of the region.

Ultimately, the Libyans themselves - and especially Libyan leaders - are responsible for this situation. Driven by greed and self-interest, they failed to agree on a social contract that would distribute Libya's wealth and resources fairly among the country's many groups and factions. But some Libyans went even further and agreed to become "proxies" for regional powers. They invited foreign militaries and armed groups into their own country for personal gain.

Now, these foreign forces are the most significant threat to Libya's future and unity. But there is still a way for Libya to leave this prolonged state of conflict behind, and prosper as a unified and peaceful country.

Another way to unity

As Italian researcher Federica Saini Fasanotti put it "Libyans will continue to be their own worst enemies-unless they, in partnership with the international community, can figure out a political model that benefits from their diversity rather than trying to override it."

Former US Ambassador to Libya Debora Jones has recently warned that unless Libyans make the necessary compromises to form a unity government that can exercise sovereignty over the entire country, "they will be forced to accept the inevitability of remaining the playing field of external regional powers in a state of endless uncertainty".

Since the revolution in 2011, every single attempt to form a sustainable central government in Libya has failed. Now, it is time for Libyans to face this reality and adopt a different approach in order to save their country.

It has become almost impossible for the central authority in Tripoli to maintain border security, unity, and sovereignty of a vast country that has a small population. So perhaps, instead of a top-down approach, what is needed, and may well work, is an approach that will deconstruct and then reconstruct the Libyan state from the bottom up.

This means real decentralisation. The power to govern, and the oil revenue that is necessary for development, must be transferred from the central government to elected local authorities. Over 100 municipalities that have been formed across Libya since 2014 can be used as the basis of this new system, or the country can be divided into larger regional authorities. These regional or local authorities, with help of transferred oil revenues, can help re-build Libya from the bottom up. These local authorities can also solve the country's ongoing security problem, by forming local security forces which can later be amalgamated into a national force.

This bottom-up, decentralised approach may well succeed in bringing sustainable peace to Libya and preserve it as a unified state. However, this ambitious plan can only work if regional powers like the UAE end their destructive interference in Libya's affairs. Otherwise, the breakdown and disintegration of Libya, and the suffering of the Libyan people, will continue for many years to come.

The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial stance.