Earlier local radio announced the president's order sacking General Mohammad al-Abdul Aziz, the head of the presidential guard and General Mohammad al-Ghazwani, the army chief-of-staff.
"The two generals have now turned the military against the president to overthrow him through this coup," Mamadouba told Al Jazeera.
Later the coup leaders released a statement under the auspices of a new 'Mauritanian state council', headed by Ould Abdul Aziz, canceling the presidential decree that had sacked him and al-Ghazwani.
President Abdallahi's daughter confirmed her father was being held by the army.
"The security agents of the BASEP [the presidential security battalion] came to our home around 9.20am (09:20 GMT) and took away my father," she was quoted by the Reuters news agency as saying.
Army units surrounded the presidential palace in the capital and the international airport was closed.
Both Mauritanian television and radio went off air, with army units surrounding their main buildings.
|Army units surrounded the main building
of Mauritanian radio [AFP]
"Huge crowds of Mauritanians are teeming the street of the capital Nouakchott," Hamdi Ould al Hacen, a freelance journalist working in Mauritania, told Al Jazeera.
"Mauritanians are very worried about the future of their newborn democracy," he added, referring to Abdallahi's win in elections last year, which saw him take over from the country's military rulers.
He also confirmed that there had been as yet no violence.
"Life is remaining as it was - businesses and schools are still open. Life is as it was," he said.
Later witnesses reported police fired tear gas to disperse a group of at least 50 supporters of the president who had gathered in central Nouakchott.
The African Union condemned the coup, calling for "the restoration of constitutional legality", in a statement issued from its headquarters in Addis Ababa, the Ethiopian capital.
The EU also criticised the coup, saying it condemned "any attempt to overthrow a democratically elected institution or government by force".
Abdallahi took over from the country's military rulers that had held power since toppling Maaouya Ould Sid Ahmed Taya, then president, in a bloodless coup in 2005.
"The crisis has been building for the last three months ... and we know that since the elections about a year and a half ago ... that civilian rule was promised, which was surprising as it doesn't happen very often in the Arab world," Mohamed Vall, an Al Jazeera correspondent, said.
"The Mauritanian people received the news very happily and they thought this to be the end of a dictatorship of 23 years but ... there were critics that did not believe the military would easily let go of power and stay on the margins."
Abdallahi replaced one government in May following criticism over the government's response to soaring food prices and to attacks over the last year carried out by al-Qaeda's north African arm.
But the new government resigned last month in the face of a proposed no-confidence vote and a new one was formed.