(Recasts with premier being kept on, to form new cabinet)
By Vincent Fertey
NOUAKCHOTT, July 3 (Reuters) - Mauritanian President Sidi Mohamed Ould Cheikh Abdallahi asked Prime Minister Yahya Ahmed El Waghef to form a new cabinet on Thursday after the premier resigned with his government over a parliamentary revolt.
Dissident members and allies of Abdallahi's ruling National Pact for Development and Democracy (PNDD-ADIL) had on Monday scheduled a no-confidence vote in parliament against El Waghef's government, saying it did not reflect the electorate's will.
This censure motion was to have been voted in the coming days. It had presented Abdallahi with his first major political crisis since he won elections last year marking the return of civilian rule to the West Saharan Islamic state.
But after accepting the resignation of the prime minister and his government on Thursday, Abdallahi immediately asked El Waghef, who is a PNDD-ADIL leader, to stay on as premier and form a new government, presidency officials said.
"The prime minister ... resigned his government to preserve the unity of the majority which backs its programme," one of the officials, who asked not to be named, said.
The government which resigned had barely been in office for two months in Mauritania, which straddles Arab and black Africa and is one of the continent's newest oil producers.
After winning last year's elections, Abdallahi took over from a military junta that had ruled since it toppled President Maaouya Ould Sid'Ahmed Taya in a bloodless coup in 2005.
He made El Waghef prime minister in May, trying to bolster his political and parliamentary power base as his country faced threats from al Qaeda attacks and soaring food prices.
But the government team named by the prime minister in May, which brought back figures from Taya's authoritarian regime and also included Islamist opposition politicians, ran into fierce opposition from some members of the ruling PNDD-ADIL.
Party members who had sponsored the no-confidence vote welcomed the resignation of the government and the prospect of a new cabinet being named.
"We think that democracy and wisdom have won," said Sidi Mohamed Ould Mohamed Vall, one of the dissident ruling party deputies who had proposed the censure motion.
But Jemil Mansour, leader of the Islamist Tawassoul party which had had two members in the government ousted by El Waghef's resignation, criticised the move.
"We're waiting for explanations, because we weren't kept informed about this resignation," Mansour said.
In an initial response to the proposed no-confidence vote sponsored by the rebels from his own PNDD-ADIL party, the Mauritanian president had on Wednesday threatened to dissolve parliament if the censure motion went ahead.
The ruling PNDD-ADIL has around 50 seats in the 95-member parliament, while other parties which participated in El Waghef's government have a further 17 seats.
The main RFD opposition party, which has 17 seats, had indicated it would support the no-confidence motion, which will not go ahead now because of the government's resignation.
In May, Abdallahi had replaced his previous technocrat prime minister, Zein Ould Zeidane, following criticism over the government's response to attacks in Mauritania over the last year carried out by al Qaeda's north African arm.
This included the Dec. 24 murder of four French tourists and the cancellation of the annual Dakar motor rally because of security fears. (For a factbox on Mauritania, please click on [nL03430534]) (For full Reuters Africa coverage and to have your say on the top issues, visit: africa.reuters.com/) (Writing by Pascal Fletcher)