The United Nations Security Council has adopted a resolution on settling the long-running dispute over the territory of Western Sahara.
But the unanimous vote was won only after significant changes to the text.
The plan for a resolution over who controls Western Sahara has been drawn up by the former American Secretary of State James Baker.
It proposes that the Western Sahara becomes a semi-autonomous region of Morocco for a transition period of up to five years.
A referendum would then take place for the population, giving them the choice to vote for independence, autonomy or integration into Morocco.
Moroccan advantages
The Moroccans have been holding out for changes to the plan - and championing their cause on the Security Council, France, Guinea and Bulgaria demanded, and got, a softening of the wording.
It makes clear that the Security Council merely supports the plan rather than endorses it, as the original text proposed.
The changes give Morocco the ability to object to any stage of its implementation.
This is a powerful compromise favouring the Moroccans who have persistently warded off demands for a referendum during 12 years of negotiations.
The Polisario Independence Movement on the other hand, backed by Algeria and some other African countries, wants an independence referendum to include the inhabitants of Western Sahara and their descendants at the time the territory was taken over by Morocco in 1976.