Libya, a mostly desert oil-rich country, has more recently been known for the 42-year rule of Colonel Muammar Gaddafi and the chaos that followed his departure.
Libya was under foreign rule for centuries until it gained independence in 1951. Soon after, oil was discovered and earned the country immense wealth.
Colonel Gaddafi seized power in 1969 and ruled for four decades until he was toppled in 2011 in a rebellion assisted by Western military intervention.
In recent years the country has been a key springboard for migrants heading for Europe, and a source of international tension as rival governments in the west and east seek to establish nationwide control.
The toppling of Muammar Gaddafi in 2011 led to a power vacuum and instability, with no authority in full control.
Since 2014, Libya has been divided into competing political and military factions based in Tripoli and the east.
Libya's media environment is highly-polarised and virtually unregulated, reflecting the country's political instability.
Satellite TV is a key news source and many outlets are based outside Libya.
Journalism is fraught with danger; reporters face threats and attacks.
Some key dates in Libya's modern history:
1911-12 - Italy seizes Libya from the Ottomans.
1942 - Allies oust Italians from Libya.
1951 - Libya becomes independent.
1969 - Muammar Gaddafi, aged 27, deposes King Idris.
1992 - UN imposes sanctions on Libya over the bombing of a PanAm airliner over the Scottish town of Lockerbie in December 1988.
2011 - Violent protests break out in Benghazi and spread to other cities. This leads to civil war, foreign intervention and eventually the ouster and death of Colonel Gaddafi.
2016 - Following years of conflict, a new UN-backed government is installed at Tripoli. It faces opposition from rival governments and a host of militias.