Libya country profile
Libya, once shunned by much of the international community over the 1988 bombing of a PanAm plane above the Scottish town of Lockerbie, has undergone a dramatic rehabilitation.
Tripoli formally took responsibility for the incident in 2003. The move, part of a deal to compensate families of the 270 victims, heralded the lifting of UN sanctions.
Months later, Libya renounced weapons of mass destruction, paving the way for a further blossoming of relations with the West.
A former Roman colony, Libya is a mostly desert country which saw invasions by Vandals, Byzantines, Arabs, Turks and more recently Italians before gaining independence in 1951.
Oil was discovered in 1959. With it, the country was transformed into a wealthy monarchy. Ten years later, though, the king was overthrown in a coup led by the 27-year-old Muammar Gaddafi, and Libya embarked on a radically new chapter in its history.
Colonel Gaddafi's revolution has been based largely on distinguishing his country from the world around it. Ideas put forward in his Green Book aim at an alternative to both communism and capitalism, while Islam is adhered to but with a unique slant - Libya has its own calendar based on Muhammad's death, for example.
Colonel Gaddafi called the new system a jamahiriya, loosely translated as a "state of the masses". Power is held by various people's committees, while in practice Gaddafi rules unopposed.
Libya was blamed for the Lockerbie plane bombing, and two Libyans suspected of organising the incident were handed over in 1999 for trial in The Hague under Scottish law. In 2001 one of the suspects was found guilty of killing 270 people in the bombing.
After Britain and Libya signed a prisoner-exchange agreement in 2009, Libya requested the transfer of the convicted Lockerbie bomber Abdelbaset Ali al-Megrahi, who was freed from gaol on compassionate grounds and returned home in August.
Tripoli paid compensation to the US victims of the bombing in 2008, opening up the possibility of full diplomatic relations with the United States.
Libya possesses considerable reserves of oil and gas, but the sector remains relatively undeveloped.
Leader: Colonel Muammar Gaddafi
Once regarded as a pariah by the West, Colonel Gaddafi began his return to the international fold after Libya settled the Lockerbie bombing claims and agreed to stop developing weapons of mass destruction.
Western politicians, including the British, Italian, French and German leaders, have since visited Tripoli.
Muammar Gaddafi is the Arab world's longest-serving leader. A shrewd operator, he survived several attempts on his life and reinvented Libya's system of government.
The colonel came to power in a bloodless coup in 1969 against the ailing King Idris I. He was inspired by the Egyptian leader Gamal Abdul Nasser, who dominated Arab politics in the 1950s and 1960s.
Though Col Gaddafi has always presented himself as a staunch Arab nationalist, his attempts to forge unity with other Arab states have met with little success. In the 1990s he turned to Africa and proposed a "United States of Africa". The concept later formed the basis of the African Union.
In the late 1970s Col Gaddafi introduced the jamahiriya - a system of governance based around "people's committees" and free of partisan politics. He has always insisted that the country is run by the people's committees, though most outside observers believe it is a police state with Col Gadaffi firmly in control.
Over the years Col Gaddafi has supported a broad range of militant groups, including the Irish Republican Army and the Palestine Liberation Organisation. Libya's alleged involvement in attacks in Europe in the 1980s triggered US military strikes in 1986. Dozens of people were killed, including the Libyan leader's adopted daughter.
One of Col Gaddafi's sons, Sayf al-Islam Gaddafi, is said to be behind the drive to break Libya's isolation. He has denied reports that he is being groomed to succeed his father.
Col Gaddafi is in his late 60s, but there is no framework for his succession and he has carefully avoided designating a successor. Analysts say he appears to be in good health but that, when he dies, years of instability could follow as competing groups and relatives struggle for supremacy.
Muammar Gaddafi was born in the desert near Sirte in 1942. He married twice and has eight children.
Media rights body Reporters Without Borders has said press freedom is "virtually non-existent" in Libya, with self-censorship being commonplace.
The state strictly controls the media. Non-governmental media were authorized in 2007, leading to the launch of newspapers and a satellite TV by a company affiliated to one of Colonel Gaddafi's sons. But in 2009, these outlets were nationalized.
The Libyan Jamahiriyah Broadcasting Corporation is the state broadcaster. Pan-Arab satellite TVs are widely watched.
The main newspapers are state controlled. Some international publications are available, but the authorities routinely censor them. Few press visas are issued to foreign journalists.
There were 323,000 internet users by September 2009. Web filtering is selective, focusing on political opposition websites.