President Sidi Ould Cheikh Abdallahi and Prime Minister Yahya Ould Ahmed Waghf had been placed under arrest after troops moved through the capital early Wednesday, security sources and witnesses said.
"We are in contact with our embassy to obtain confirmation of the events that appear to be taking place in Nouakchott. Based on initial information, it seems that a group of generals are holding the prime minister," a French foreign ministry spokesman told AFP in Paris.
Mauritania has been facing a political crisis and on Monday 48 MPs walked out on the ruling party less than two weeks after a vote of no confidence in the government prompted a cabinet reshuffle.
Abdallahi became Mauritania's first democ ratically elected president last year after a period of transition supervised by a military council that deposed the previous president in a bloodless coup in August 2005.
The largely desertified country has a history of coups since its independence from France in 1960.
The renegade lawmakers criticised Abdallahi's exercise of "personal power", adding that he had "disappointed the hopes of Mauritanians," a spokesman said.
The Mauritanian president last month threatened to dissolve parliament after MPs filed a motion of no confidence in his new government, which then resigned.
Recently, they tried to call a special session of parliament to create a commission to investigate the country's response to the rising cost of living, and also the financing of a foundation run by the president's wife.
The West African country imports more than 70 percent of its food needs and has been hard hit by the food crisis.
This is my favorite part
If your destination is a country where a coup d'etat is ongoing or seems likely, register with your embassy as soon as you arrive. Ask the embassy about evacuation plans in the event of emergency. Try to limit your time in the country and have a contingency plan for how you will get out if the airports shut down. If you can't leave, gather stocks of food and water in your hotel room. Filling the bathtub with water in advance can provide a supply if water supplies are shut off. If the situation deteriorates, try to reach your embassy by phone. Stay in your hotel if you hear gunfire or shelling. Stay away from windows, keep the drapes closed, and sleep in the part of the room that offers the most protection from possible gunfire.