* President to rule by decree, says will use all powers
* Court rejects his appeal against ban on referendum
* Brings uncertainty over parliamentary election
(Adds quote, details)
By Abdoulaye Massalatchi
NIAMEY, June 26 Niger President Mamadou Tandja assumed sweeping powers on Friday after the West African country's highest court rejected his latest attempt to push through a referendum on extending his rule.
Tandja announced he would from now on rule by decree, potentially letting him order the vote, which is opposed by foreign donors and regional states, unions and even some former allies in the uranium exporting desert state.
Tandja is due to step down when his second term in office ends later this year but wants a referendum which could hand him another three years in office.
In a message broadcast on state radio Tandja said he took the decision to rule by decree because it was vital to "continue to safeguard the essential foundation of the nation and to preserve the interests of the people".
The landlocked former French colony of 15 million people, which stretches to the heart of the Sahara desert, hopes to become the world's second biggest producer of uranium. It is one of the poorest countries in the world.
The president's announcement came hours after the Constitutional Court rejected his request for a review of its earlier ruling that the referendum would be unlawful.
"Without weakness, I will use all my powers under relevant laws and regulations of the republic to find a solution to this stalemate," Tandja said.
The president dissolved parliament in May, facing opposition to his plan there, and it was unclear whether the parliamentary election scheduled for Aug. 20 would now go ahead.
Tandja's plans have sparked protests and drawn criticism from foreign donors and regional political bodies, which said they were a step backwards and threatened sanctions against Niger.
The president says he needs the time to introduce a fully presidential system of government that will give the president more power and end current blockages in governance.
He also says people want him to complete large infrastructure projects, including a hydro-electric dam, an oil refinery and French energy giant Areva's CEPFi.PA 1.2 billion euro ($1.70 billion) Imouraren uranium mine. (Editing by Matthew Tostevin and Louise Ireland)