Political leaders in Madagascar have signed an agreement paving the way for elections to be held within a year to re-establish democracy on the island.
The deal allows the return of exiled leader Marc Ravalomanana, who was overthrown in 2009 by current president Andre Rajoelina in an army-backed coup.
The South African Development Community, which suspended Madagascar after the coup, helped broker the deal.
The Indian Ocean island has been beset by instability for several years.
It was isolated by the international community after the coup - European Union donors froze aid and it was also suspended from the African Union.
But South Africa's deputy Foreign Minister, Marius Franzman, presided over the signing ceremony in Madagascar's capital, Antananarivo.
The plan, which was agreed by a group of eight political parties, leaves Mr Rajoelina in charge of a transitional authority until elections scheduled for March next year.
Marc Ravalomanana, currently in exile in South Africa, will be allowed to return to participate in the transition. His representatives say he is willing to compromise.