A group of Mauritanian army officers announced the overthrow of the president on Wednesday, hours after troops took control of the national media and the army chief of staff headquarters in the capital of this oil-rich Islamic nation.

The group, which identified itself as the Military Council for Justice and Democracy (search), announced the coup against President Maaoya Sid'Ahmed Taya (search), who was abroad, through the state-run news agency.

With his plane on the tarmac, Taya held talks at the airport with Niger's President Mamadou Tandja. Taya did not speak to reporters and security forces kept journalists at a distance.

Taya, who has allied himself with the United States in the war on terror, has faced staunch opposition among Islamic groups in his impoverished desert nation of 3 million and has cracked down ruthlessly on opponents since a 2003 coup attempt.

Heavily armed soldiers deployed in force around the presidential palace, ministries and other strategic buildings and on the streets of the capital of Nouakchott (search), blocking key roads and several entrances to the city.

A short burst of automatic gunfire was heard near the palace, where three anti-aircraft truck batteries were set up at midmorning. No casualties were reported.

Mohamed Ali, a father of eight who lives nearby, was among dozens of people fleeing the city center.

"I'm afraid for my family," he said. "I'll come back when things are back to normal."

The presidential guard troops cut state media broadcasts and the nation has no private stations. The airport also was closed to civilian flights, according to the military.

Taya has survived several coup attempts during his 20-year reign, but only the 2003 effort to overthrow him had made it past the planning stage, marked by several days of street fighting in the capital.

He implemented a crackdown after that against members of Islamist groups and the army, jailing scores of people accused of plotting to overthrow him. His government also has accused opponents of training with Al Qaeda-linked insurgents in Algeria.

A June 4 border raid on a remote Mauritanian army post by Al Qaeda-linked insurgents sparked a gunbattle that killed 15 Mauritanian troops and nine attackers. Algeria's Salafist Group for Call and Combat claimed responsibility for the attack, saying in a message on a Web site that the assault was "in revenge for our brothers who were arrested in the last round of detentions in Mauritania."

Mauritania, a sparsely populated nation on the northwestern edge of the Sahara, is strictly regulated by Taya, who took power in a 1984 military coup and tried to legitimize his rule in the 1990s through elections the opposition says were fraudulent.

The predominantly Islamic West African nation, which straddles black and Arab Africa, opened full diplomatic relations with Israel six years ago, leading to widespread criticism from Islamic groups at home.

The president, who is in his 60s, supported Saddam during the 1991 Gulf War, but switched alliances dramatically in the late 1990s — breaking diplomatic ties with Iraq.

Oil recently was discovered in reserves offshore, and the country is expected to begin pumping crude for the first time early next year.