Gen Mohamed Ould Abdelaziz launched a coup in August after he was sacked
Mauritania's military rulers and opposition leaders have signed an agreement to end a political crisis following a coup last August.
Under the deal, former junta leader General Mohamed Ould Abdelaziz is suspending his campaign in presidential polls that had been set for 6 June.
The vote is now due to take place in July, and the opposition is expected to contest it.
The deal also envisages the formation of a unity government.
It was reached after lengthy talks involving international mediators in Senegalese capital, Dakar.
Gen Mohamed Ould Abdelaziz seized power in August 2008 from Sidi Mohamed Ould Cheikh Abdallahi - the first democratically elected president of the western African nation.
Gen Abdelaziz launched the coup after he was sacked by the president.
The ousted president was held under house arrest until December 2008.
There has been intense international pressure on the ruling junta to return the country to democracy.
Mauritania has a long history of coups, with the military involved in nearly every government since its independence from France in 1960.