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.
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.
President: Mohamed Ould Abdelaziz
General Mohamed Ould Abdelaziz came to power by ousting his democratically-elected predecessor, President Sidi Ould Cheikh Abdallahi, in a military coup in August 2008.
Nearly a year later, he won his own democratic mandate by being elected president in elections held under an agreement with coup opponents in July 2009.
The official results gave Gen Abdelaziz 52%, well ahead of the second placed candidate, parliament speaker Messaoud Ould Boulkheir, who got 16%.
The main opposition candidates claimed the result was fabricated and merely designed to legitimise Gen Abdelaziz's military rule, but international observers said the vote had been largely free and fair. Sid'Ahmed Ould Deye, the head of the Electoral Commission, resigned after expressing his own doubts about the result.
After his win, the new president-elect said he would strengthen Mauritania's army to "fight terrorism in all its forms".
Previously serving as President Abdallahi's chief of the presidential staff, he toppled his boss when Mr Abdallahi tried to dismiss him in August 2008, amid reports of a political rift between the two men.
Gen Abdelaziz had also been instrumental in the 2005 coup that overthrew former President Maaouiya Ould Taya and installed the coup leader Ely Ould Mohamed Vall as president.
President Abdallahi's overthrow was one of 11 coups or attempted coups since independence from France in 1960. He won a presidential vote in March 2007 to become Mauritania's first democratically-elected president since independence.
A chronology of key events:
3rd-7th centuries AD - Berber and Arab migrants displace the original inhabitants of 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.
1644-74 - Mauritanian Thirty-Year War: Berbers unsuccessful in repelling Arab warriors.
1850s-60s - French forces gain control of southern Mauritania. In 1898 France wins the allegiance of Moors in the region.
1904 - France establishes Mauritania as a colonial territory.
1920 - Mauritania becomes part of French West Africa, and is administered from Senegal.
1946 - Becomes a French overseas territory.
1957 - Nouakchott established as the capital.
Independence
1958 - Mauritania becomes self-governing.
1960 28 November - Mauritania becomes independent.
1960 - Mauritania makes territorial claims to neighbouring Spanish Sahara.
1973 - Mauritania joins the Arab League.
1976 - Mauritania and Morocco divide up Spanish Sahara, now known as Western Sahara, after Spain pulls out. Guerrillas of the Polisario front, aiming to establish an independent state in the territory, fight the forces of both countries.
Military coup
1978 - First post-independence president, Moktar Daddah, is deposed in a military coup. The coup is prompted partly by the struggle against Polisario guerrillas and resulting financial strains.
1979 - Mauritania signs a peace agreement with the Polisario front and renounces its claim to Western Sahara. Morocco annexes Mauritania's former share of the territory.
1981 - Attempted coup; Moroccan involvement is alleged and Mauritania breaks ties with the country.
1984 - Coup brings Colonel Maaouiya Ould Sid Ahmed Taya to power.
1989 - Race riots erupt in Mauritania and Senegal after a border dispute. Tens of thousands of black Mauritanians are driven out of the country into Senegal. Others become the targets of attacks and land seizures. Hundreds of people are killed.
1992 - Taya elected president.
1993 - US ends development aid over Mauritania's treatment of its black population and its support for Iraq in the 1991 Gulf War.
1997 - President Taya re-elected in a poll boycotted by the main opposition parties.
2001 September - Morocco's King Mohammed visits - a turning point in the often-strained relations between the two countries.
2002 January - Opposition party Action for Change, which campaigns for greater rights for blacks and descendants of slaves, is banned.
2002 June - Country granted $1.1bn (£740m) in debt relief.
Coup plots
2003 June - Attempted coup: Troops loyal to President Maaouiya Ould Taya regain control of the capital after heavy fighting with rebel soldiers.
2003 October - First post-independence president, Moktar Ould Daddah, dies in Paris.
2003 November - President Taya re-elected with 67% of vote in first round of elections. Opposition alleges fraud.
2003 December - Former President Haidallah is fined and given suspended prison sentence for plotting coup.
2004 August - Army officers arrested in wake of alleged coup plot.
2004 September - Government says it has foiled a coup plot - the third in 15 months. In October President Taya accuses Libya and Burkina Faso of financing recent coup attempts.
2005 January - UN calls for food aid in the wake of locust invasions in 2004. Mauritania was the African country worst hit, with its crop production obliterated.
2005 June - Attack on an army base in the Sahara kills 15 soldiers. The government blames insurgents from Algeria.
2005 3 August - With President Taya out of the country, troops seize government buildings and a group of officers announces the overthrow of the president and the formation of a military council.
2006 February - Offshore oil production begins.
2006 June - Voters in a referendum approve constitutional changes which will limit the president to two five-year terms in office.
Abdallahi elected president
2007 March - Presidential elections won by Sidi Ould Cheikh Abdallahi.
2007 April - Mauritania is readmitted to the African Union, having been suspended after the 2005 coup.
2007 August - Parliament outlaws slavery, a practise still widespread in spite of a 1981 ban.
2008 January - The 2008 Dakar Rally is cancelled following the murder of four French tourists in Mauritania in December, allegedly by attackers linked to al-Qaeda.
2008 February - Gunmen fire at the Israeli embassy in the capital, Nouakchott. Seven people detained over attack released for lack of evidence.
2008 April - Eight al-Qaeda suspects alleged to have been involved in killing of French tourists and attack on Israeli embassy are arrested.
2008 May - Members of moderate Islamist opposition party join government for first time.
Abdallahi toppled
2008 August - The military overthrows President Abdallahi - the country's first democratically elected leader - and forms a state council to rule the country. The move came after the president tried to dismiss several senior army commanders.
2008 September - Twelve soldiers killed in ambush claimed by al-Qaeda, which had called on Mauritanians to rise up against the coup leaders.
2009 January - Military government promises to hold elections by June, along with a constitutional referendum.
2009 March - Israel closes embassy at government request, days before visit by Libyan leader Muammar Gaddafi. Relations with Israel suspended in January in protest at Gaza military operation.
2009 July - Gen Mohamed Ould Abdelaziz - leader of the August 2008 military coup - wins presidential elections.
2009 August - A suicide bombing targetting the French embassy in Nouakchott is claimed by al-Qaeda.
2009 November - Slavery still exists in Mauritania, says the UN Special Rapporteur on Slavery.
2009 December - Al-Qaeda says it has kidnapped two Italians, weeks after kidnapping three Spanish aid workers.
2010 April - Mauritania, Mali, Niger and Algeria set up joint command to tackle threat of terrorism.
2010 May - Three al-Qaeda suspects sentenced to death for murder of four French tourists in 2007.
2010 July - Mauritania adopts new anti-terrorism law to give security forces greater powers to fight al-Qaeda.
2010 August - Two Spanish aid workers kidnapped in Mauritania by al-Qaeda in November are set free in Mali after nine months in captivity.
2010 September - Mauritanian aircraft strike at suspected al-Qaeda militants in Mali, after kidnappers crossed into Mali with seven foreigners abducted in Niger.
2010 November - Mauritania marks half-century of independence from France.