The African Union has decided to allow Morocco back into the fold after a 33-year absence, despite stiff resistance from some member states over the status of Western Sahara.
After an emotional and tense debate, member states decided by consensus to leave the question of the disputed territory of Western Sahara for another day, and resolve it with Morocco "back in the family".
"Morocco has been admitted to join the AU with a view that it will become the 55th member of the continental body. That's made with the understanding that Western Sahara will remain a member of the AU," said Lamine Baali, ambassador of Western Sahara to Ethiopia and the AU.
"All the debates were focused on [the issue] that Morocco should respect the internationally recognised border of Western Sahara."
The only African country not to belong to the AU, Morocco left its predecessor, the Organisation of African Unity, in 1984 after the body recognised the independence of Moroccan-occupied Western Sahara.
Morocco submitted its bid to rejoin last year, reportedly in the hope that being inside the AU would bring it diplomatic gains against Western Sahara's independence movement - the Polisario Front - and allow it to lobby against Western Sahara's membership in the AU.
But Baali said Morocco had been re-admitted "with the understanding that Western Sahara will remain a member of the AU".
The membership of relatively wealthy Morocco was welcomed by many members of the AU, which has been criticised for being overly dependent on non-African donor funding.
There was also some opposition from countries supporting the Polisario, observers said.
An African Union source, who followed the debate for Morocco to return to the continental body, said that 39 countries supported Morocco's bid but nine voted against it.
Polisario leader and member of the Sawhrawi delegation Minister Mohamed Beiset told Al Jazeera that while there was a lengthy debate, "the wisdom of the African leaders made it possible to reach a consensus that was acceptable to everyone".
The delegation decided, said Beiset, that "it was better to have Morocco inside the house, inside the family, and to try to reach African solutions to African problems".
He congratulated Morocco for joining the AU, and said it was "a new opportunity that we should all seize in starting a ... genuine dialogue between us to reach a solution to the long-standing conflict that has separated us".
With reporting by Hamza Mohamed in Addis Ababa.
Source: Al Jazeera and news agencies