By Vincent Fertey and Ibrahima Sylla
NOUAKCHOTT (Reuters) - Soldiers overthrew Mauritania's first democratically elected president in a coup on Wednesday and announced a military junta was taking charge of the northwest African Islamic state.
Soldiers seized President Sidi Mohamed Ould Cheikh Abdallahi at his palace after he sacked senior army officers during a political crisis in the country, which straddled black and Arab Africa and is one of the continent's newest oil producers.
The African Union, the European Union, the United States and the Organisation of the Islamic Conference condemned the coup. But in the largely desert country of 3 million, opinion was divided.
A "State Council" led by one of the sacked officers, Mohamed Ould Abdelaziz, said Abdallahi was now a "former president" and annulled his previous decree sacking Abdelaziz and the heads of the army and Gendarmerie.
The communique, described as the council's "Statement No. 1", was broadcast by Gulf-based Arabic television stations.
Abdallahi won Mauritania's first free, fair elections since independence in 1960 last year, taking over from a military government which ousted President Maaouya Ould Sid'Ahmed Taya in a bloodless 2005 coup.
Abdelaziz was also instrumental in Taya's overthrow, the last successful coup in Africa, and was No. 2 in the junta.
The president's daughter, Amal Mint Cheikh Abdallahi, said the presidential guard came to the residence and took away her father at around 9.20 a.m. (0920 GMT)
"We are being kept in the house, forbidden to leave. There are guards posted in the kitchen, the bedrooms, even the showers. The phones have been cut," she said.
A presidency official who declined to be named said the prime minister and interior minister had also been arrested.
The country's main airport was closed and soldiers on jeeps with heavy guns stood guard outside government buildings.
Youths in T-shirts or more traditional robes gathered nearby, some waving joyfully to television cameras. But police fired tear gas at around 50 supporters of Abdallahi.
"We are against the military and we are deeply against this coup. We support Sidi to the death," said one, Kory Ould Naina.
FOREIGN CONDEMNATION
The international community, which had widely welcomed last year's democratic elections, broadly condemned Wednesday's coup.
The Arab League voiced "deep concern", the African Union demanded the return of "constitutional legality" and West African regional heavyweight Nigeria said it would not recognise a government that came to power through unconstitutional means.
The United States and United Nations called for a return to constitutional rule, while EU Aid Commissioner Louis Michel demanded Abdallahi be restored to power, saying the coup could "put into question our policy of cooperation with Mauritania."
Abdallahi dismissed his government in May after criticism over its response to soaring food prices and to a series of attacks over the last year by al Qaeda's north African arm.
A new government resigned last month in the face of a proposed no-confidence vote, and a replacement cabinet lacked the support of the opposition Union of Forces for Progress (UFP) and Islamist Tawassoul parties included in the previous team.
This week most of the members of parliament belonging to Abdallahi's PNDD-ADIL party quit the party en masse.
"It's a pity it took a military coup, but I completely support the change it has brought," one of the group, Mohamed Ali Ould Cherif, told Reuters on Wednesday.
The opposition RFD party called for a return to constitutional order, but stopped short of condemning the coup.
"There were rumours about two weeks ago that might be a coup in the offing. It was a bit of an open secret that two senior military commanders were fanning this split within the ruling party," said Ruairi Patterson, an analyst at Control Risks.
Investments in oil and mining are unlikely to be seriously affected, Patterson said.
Mauritania's vast territory, nearly twice as big as former colonial ruler France, is rich in iron ore, copper and gold.
Miner First Quantum, ArcelorMittal, and Industries Qatar all have mines or projects there. Malaysia's Petronas runs an offshore crude project that started up in 2006 and French oil major Total is prospecting.
Sidi Ould Cheikh Abdallahi.

Mauritania's President Sidi Ould Cheikh Abdallahi has been freed "without conditions" from house arrest by the military junta on Sunday.

Sidi Mohamed Ould Cheikh Abdallahi (Arabic: سيدي محمد ولد الشيخ عبد الله) is a Mauritanian politician who served in the government during the 1970s, and after a long period of absence from politics he won the March 2007 presidential election, taking office on 19 April 2007. He was deposed in a military coup d'etat on August 6, 2008. 

He was removed from Lemden to his soldiers guarded private residence in Nouakchott (Arabic: نواكشوط or انواكشوط), the Capital and by far the largest city of Mauritania. It is one of the largest cities in the Sahara. The city is the administrative and economic centre of Mauritania.

Sidi's release is a result of protracted and intense international pressure on the ruling military High Council of State headed by General Mohamed Ould Abdel Aziz, to restore constitutional rule to the nation. France and the US had canceled their aid, while the African Union has also suspended the country due to the 6 August coup d'état. But the leaders still refused to reinstate Sidi, amid the demands of the EU, the United States and other major donors.

Nouakchott.
Reuters has reported that "the EU says it will avoid sanctions that would hurt Mauritania's 3 million people, and continues to pay Nouakchott over $100 million a year for fishing rights, underpinning the state budget." Further, the United States on Friday announced it would cut trade benefits for Mauritania as of January 1. 

It is expected that Sidi will be allowed to participate in a "national consultation meeting" on December 27. But in an interview by the French newspaper Le Monde, he said that "participating in the December 27 talks would be to legitimise the coup d'état".