One of Africa's newest oil producers, the Islamic Republic of Mauritania bridges the Arab Maghreb and western sub-Saharan Africa.
The largely-desert country presents a cultural contrast, with an Arab-Berber population to the north and black Africans to the south. Many of its people are nomads.
In the Middle Ages Mauritania was the cradle of the Almoravid movement, which spread Islam throughout the region and for a while controlled the Islamic part of Spain.
European traders began to show interest in Mauritania in the 15th century. France gained control of the coastal region in 1817, and in 1904 a formal French protectorate was extended over the territory.
Mauritania is rich in mineral resources, especially iron and ore. It is seen by the West as a valuable ally in the fight against Islamist militancy in the Sahel region.
Read more country profiles - Profiles by BBC Monitoring
ISLAMIC REPUBLIC OF MAURITANIA: FACTS
Area: 1,030,000 sq km
Population: 4.6 million
Languages: Arabic, plus French, Wolof, Pulaar, Soninke, Zenaga
Life expectancy: 62 years (men) 66 years (women)
President: Mohamed Ould Ghazouani
Former defence minister Mohamed Ould Ghazouani won the 2019 presidential election, succeeding his mentor and fellow army officer Mohamed Ould Abdel Aziz.
Mauritania has one of the most open media environments of the Maghreb region.
Internet access is unrestricted. There were 969,000 internet users by December 2021 (Worldinternetstats.com).
Some key dates in Mauritania's history:
3rd-7th centuries AD - Berber and Arab migrants arrive in present-day Mauritania.
9-10th Centuries - Empire of Ghana has its capital in present-day south-west Mauritania.
1076 - Berber Almoravid warriors defeat the Empire of Ghana.
1500s - European mariners and traders establish settlements.
1850s-60s - French forces gain control of southern Mauritania. In 1898 France wins the allegiance of Moors in the region.
1960 - Mauritania becomes independent from France.
1978 - First post-independence president, Moktar Daddah, is deposed in a military coup.
1979 - Mauritania gives up its claims to Western Sahara, deferring to an armed independence movement there.
2009 - Gen Mohamed Ould Abdelaziz - leader of the August 2008 military coup that ousted President Sidi Ould Cheikh Abdallahi - wins presidential elections.
2014 - France establishes a long-term military operation to prevent jihadist groups from setting up safe havens in the Sahel, including Mauritania.