The soldiers also said Thursday on state TV that the country's constitution had been suspended and all its institutions dissolved. The spokesman for the soldiers said the country is now being led by the Supreme Council for the Restoration of Democracy and asked their countrymen and the international community to have faith in their ideals which "could turn Niger into an example of democracy and of good governance."
Smoke rose from the white-hued multistory palace complex and the echo of machine-gunfire for at least two hours sent frightened residents running for cover, emptying the desert country's downtown boulevards at midday.
Traore Amadou, a local journalist who was in the presidency when the shooting began, said President Mamadou Tandja was kidnapped by mutinous troops.
French radio station Radio France Internationale reported that the soldiers burst in and neutralized the presidential guard before politely escorting Tandja outside to a waiting car which drove him toward a military camp on the outskirts of the capital. His whereabouts remained unknown hours later when the soldiers took to the airwaves to announce the coup.
Tandja first took power in democratic elections in 1999 that followed an era of coups and rebellions. But instead of stepping down as mandated by law on Dec. 22, he triggered a political crisis by pushing through a new constitution in August that removed term limits and gave him near-totalitarian powers.
Niger has become increasingly isolated since then, with the 15-nation regional bloc of West African states suspending Niger from its ranks and the U.S. government cutting off non-humanitarian aid and imposing travel restrictions on some government officials.
The ease with which Niger's democratic institutions have been swept aside has marked a setback for a region struggling to shake off autocratic rulers. In Guinea, a military junta seized power in December 2008 after the death of the country's longtime dictator, only to have the junta leader go into voluntary exile after he survived an assassination attempt a year later.
The nation's latest troubles began suddenly in Niamey on Thursday afternoon, when gunfire broke out around the impoverished nation's small presidency.
"Armored vehicles came into the palace and began shooting at the building," said Moussa Mounkaila, a palace driver. He said the mutinous troops had come from a military barracks at Tondibia, about seven miles (12 kilometers) west of the capital. Mounkaila said he saw smoke rising from the damaged presidency before he jumped over a wall and fled.
Tandja had just gathered government ministers for a Cabinet meeting when the gunfire erupted outside.
A diplomat in neighboring Burkina Faso said the mutinous soldiers are led by Col. Abdoulaye Adamou Harouna, the former aide-de-camp of Niger's previous coup leader Maj. Daouda Mallam Wanke. In Niamey, soldiers contacted by telephone inside their barracks said the coup was led by Col. Adamou Harouna, but gave a different first name - saying it was Djibril, not Abdoulaye, and did not confirm whether or not he was an aide to Wanke.
It was Wanke that led the 1999 coup, seizing power after the country's former military strongman was gunned down in an incident that was dubbed "an accident." Wanke, however, organized democratic elections less than a year later, which Tandja won. The diplomat, who asked not to be named because he is not authorized to speak to the media, said that Harouna - once Wanke's top aide - is part of an army faction that is deeply disillusioned with Tandja for violating his constitutionally mandated term limit.
They see him as having violated the trust the military initial placed in him when they ceded power in elections 11 years ago, he said. It was not immediately possible to confirm the diplomat's account or to resolve the discrepancy in the name.
U.N. Secretary-General Ban Ki-moon was closely following developments and receiving regular updates from his Special Representative for West Africa Said Djinnit, U.N. deputy spokeswoman Marie Okabe said.
"It would be recalled that the secretary-general has called on the stakeholders in Niger to swiftly revert to constitutional order in the settlement of the political crisis that developed in that country last year," Okabe said at U.N. headquarters in New York.
In their broadcast on state TV, the soldiers said the country was now under a curfew and that all its borders had been sealed.
An Air France flight that was scheduled to land at Niamey on Thursday afternoon was diverted to neighboring Burkina Faso, said a company spokeswoman.
So was the private plane of the Senegalese foreign minister who had been dispatched by Senegal's President Abdoulaye Wade and who was prevented from landing in Niger by the army, said Senegalese government spokesman Bamba Ndiaye.
Just days before Thursday's coup, Wade had been named mediator for Niger's political crisis by ECOWAS, a regional bloc of 15 West African countries.
After three coups hit Niger between 1974 and 1999, Tandja twice won votes deemed fair. But in the waning months of his final term, critics say he went down the path of many long-serving African despots, breaking a promise he had frequently made to step down when his term expired in December.
Opposition leaders say Tandja morphed from democrat to dictator over the course of several months last year. In May 2009, he dissolved the national assembly because it opposed his plan to hold a referendum removing term limits. The move was legal but the following month he invoked extraordinary powers to rule by decree, dissolving the constitutional court that also opposed his plan.
The two bodies represented the only real checks on his power. The last obstacle was the constitution itself, which contained a clause saying that the two-term limit could not be amended. In August, Tandja forced through a referendum boycotted by the opposition that created a new constitution. It gave him greatly boosted powers and an unprecedented three-year extension of his rule before another round of elections can be held.
The Aug. 4 vote came despite opposition from international donors who could cut crucial aid and from critics at home who say the Islamic nation's nascent democracy has been hijacked by a new African strongman.
Tandja claims he is only pushing to stay in power because his people have demanded it. He says they want him to finish several mammoth projects worth billions of dollars that have begun in recent months, including a hydroelectric dam, an oil refinery and what will be the largest uranium mine in Africa.
Uranium-rich Niger is ranked at the bottom on the U.N.'s worldwide human development index and has an astounding 70 percent illiteracy rate. The nation on the Sahara's southern edge has been perpetually battered by drought and desertification.