After lurching from one military coup to another, Nigeria now has an elected leadership.
But the government faces the growing challenge of preventing Africa’s most populous country from breaking apart along ethnic and religious lines.
Thousands of people have died over the past few years in attacks led by jihadists in the north-east.
Separatist aspirations have also been growing, and the imposition of Islamic law in several northern states has embedded divisions and caused thousands of Christians to flee.
Nigeria’s insecurity has added to its economic woes, hindering foreign investment.
The former British colony is one of the world’s largest oil producers, but few Nigerians, including those in oil-producing areas, have benefited.
The Federal Republic of Nigeria
Population 186 million
Area 923,768 sq km (356,669 sq miles)
Major languages English (official), Yoruba, Ibo, Hausa
Religions Islam, Christianity, indigenous beliefs
Life expectancy 52 years (men), 54 years (women)
Currency Nigerian Naira
President: Muhammadu Buhari
A former military ruler, Muhammadu Buhari swept to an historic election victory in March 2015 when he became the first opposition candidate to win a Nigerian presidential poll.
After helping oust elected President Shehu Shagari in 1983, the then Major-General Buhari sought to combat crime and corruption, but was also accused of serious rights abuses.
In 1985, he was overthrown by Gen Ibrahim Babangida.
Mr Buhari has now distanced himself from military rule, promising to respect democracy and govern as a civilian leader.
Nigeria is one of Africa’s biggest media markets. There are hundreds of radio stations and terrestrial TV networks, as well as cable and satellite platforms.
Reporters Without Borders says journalists face threats and violence in the course of their work.
Many millions of Nigerians are online, and WhatsApp and Facebook are leading social platforms.
Some key dates in Nigeria’s history:
Colonel Odumegwu Emeka Ojukwu announced the secession of the Republic of Biafra in 1967, sparking a devastating civil war
16-18th centuries – Slave trade sees Nigerians forcibly sent to the Americas to work on plantations.
1850s – Britain establishes presence, which it consolidates over the next 70 years as the Colony and Protectorate of Nigeria. In 1922, part of former German colony Kamerun is added under a League of Nations mandate.
1960 – Independence, with Prime Minister Sir Abubakar Tafawa Balewa leading a coalition government. He is killed in a coup in 1966.
1967 – Three eastern states secede as the Republic of Biafra, sparking a bloody three-year civil war.
1983 – Major-General Muhammadu Buhari seizes power in a bloodless coup, ushering in a period of political instability capped by the 1999 presidential and parliamentary elections.
2000 – Adoption of Islamic law by several northern states in the face of opposition from Christians.
2009 – Boko Haram jihadists launch a campaign of violence that spreads to neighbouring countries. One high-profile incident involves the kidnapping of 200 school girls in 2014.
2015 – Muhammadu Buhari wins presidential election – first opposition candidate to do so.
2019 – President Buhari was recently declared the winner of the February 23, 2019 General Election.
Source: BBC News