One of Africa's newest oil producers, 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.
Morocco opposed the country's independence in 1960 and for a time tried to absorb it. But Morocco's King Hassan II later improved ties as part of his plan to divide Western Sahara.
The eventual deal in 1976 brought more problems, though, with Mauritania coming under attack by Polisario Front guerrillas, who opposed Moroccan control of Western Sahara, and the subsequent downfall of the leader since independence – Moktar Ould Daddah – in a military coup.
Continue reading the main story
At a glance
Politics: A coup in 2005 ended President Taya's two decades of authoritarian rule; presidential polls in March 2007 marked the start of a short-lived move towards democracy – another coup followed a year later
Economy: Mauritania depends heavily on drought-prone agriculture; its rich coastal fishing grounds are threatened by over-exploitation; offshore oil exploitation began in 2006
International: Al-Qaeda militants are presenting a serious challenge and have kidnapped and killed several foreigners
Peace was agreed with the Polisario in 1979, but this in turn worsened relations with Morocco, until a detente in 1985. More recently, ties with Senegal have been strained over the use of the Senegal River, which forms the border between the two countries.
Mauritania officially banned slavery in 1981. The government has denied accusations that it is still being practised.
One of the world's poorest countries, Mauritania has pinned hopes for future prosperity on the exploitation of its offshore reserves of oil and natural gas. The Chinguetti and Tiof fields are expected to yield millions of barrels of oil.
The country forged diplomatic ties with Israel in 1999, one of three Arab nations to have done so, but suspended them in January 2009 in protest at Israel's military operation in Gaza. It closed the Israeli embassy in March.
Under former President Maaouiya Ould Sid Ahmed Taya, Mauritania was an ally of the US in its “war on terror”. American special forces were despatched to train Mauritanian troops.
Al-Qaeda militants operating in Mauritania, Algeria and Mali have become increasingly active, kidnapping and killing several foreigners.
Mauritania's response has been to take an increasingly tough line against the militants, refusing to negotiate with al-Qaeda over hostages.