Morocco's readmission to the AU came on the back of a multi-faceted strategy to gain favour on the continent, particularly among West and Francophone countries.
Morocco's return to the African Union after a 33-year absence is being greeted with joy at home where it is seen as a diplomatic triumph that will help the country to regain its position as a leader on the continent. The re-admission is also seen as a personal success for King Mohammed VI, who for the last few years has been on countless visits to sub-Saharan Africa, signing nearly 1,000 co-operation agreements since 2000, and attempting to project his country as a friend and significant investor.
Speaking in Addis Ababa after the decision was taken, the King said: "It is so good to be back home, after having been away for too long. It is a good day when you can show your affection for your beloved home. Africa is my continent, and my home".
Morocco left the predecessor of the AU, the Organisation of African Unity (OAU), in 1984, in protest at the body's recognition of the Western Sahara. Moroccan troops entered the territory in 1975 after the former colonial power Spain pulled out, sparking an independence fight which has not been resolved to this day. Whereas Morocco claims the territory is an integral part of the country, the OAU viewed its move as neo-colonial and opted to give the self-declared Sahrawi Arab Democratic Republic (SADR) a seat instead.
Although the debate on Morocco's readmission this Monday afternoon in Addis Ababa appeared to have taken place in a surprisingly short time, resulting in 39 votes in favour and nine against, observers say there were in fact a number of tense moments and obstacles to be overcome before the deal was sealed.
"There were requests for a postponement of the vote, with others proposing a committee to be first put in place to decide on the borders of Western Sahara and Morocco," says Liesl Louw-Vaudran, a consultant at the South Africa-based Institute of Security Studies who attended the summit.
Morocco's traditional opponents have been the AU heavyweights Algeria, which hosts tens of thousands of Sahrawi refugees and has given support to the Sahrawi independence fighters Polisario, and South Africa, which has proclaimed a strong opposition to neo-colonialism. It is thought both countries argued against Morocco's re-admission, but according to Louw-Vaudran, diplomatic moves by AU leaders appear to have assuaged their fears. "The fact that the King was even there was a sign that Morocco was fairly confident of success," she says.
Rejoining the union
The key to the turn-around in Morocco's relations with the AU appears to have been its targeting of particularly West African and Francophone African countries in recent years. Moroccan companies have been on an aggressive 'going out' policy, from phosphate giant OCP signing deals to provide fertilisers to help African farmers, to banks such as Attijariwafa opening at least 3,500 branches across Africa, to telecoms and even car insurance companies offering new products and services.
In December, Morocco announced a joint venture with Nigeria to build a pipeline from the Niger Delta to run under the West African Atlantic coast and supply gas to a number of countries in West Africa. West African francophone countries such as Gabon, Côte d'Ivoire, Chad and Senegal were all known to have been sympathetic to Morocco's position.
"Morocco has marketed itself as a leading investor in West Africa with a natural network of business contacts to play upon," says Issandr El-Amrani, North Africa project director with the International Crisis Group. "This has been partly motivated by a desire to balance out Algeria's influence - not being in the AU has deprived Morocco of a major role while Algeria has been able to increase its influence on the Peace and Security Council for example."
Other high-profile moves, such as re-opening the investigation into the 2010 deaths of eleven members of the Moroccan security forces during the break up of a democracy protest camp at Gdim Izik outside Laayoune in the disputed territory, may have also helped convince doubters. After that incident, 24 Sahrawis were jailed by a military court in 2013 for their role in the riots that followed the intervention. But Morocco's Court of Cassation last year ruled that conviction should be quashed and replaced with a civilian trial in which lawyers for the victims as well as international journalists and observers would be allowed for the first time. That case opened in Salé near Rabat just a week before the AU vote, although it was postponed a few days later amid bitter rows with the defence and a decision to order medical checks and call further witnesses.
Despite the undoubtable diplomatic success of rejoining the AU, many Moroccans have still been left with a bitter taste in their mouths - the SADR still has a seat in the AU and as yet there do not appear to be any concrete plans to change this. For their part, Western Saharan officials responded to Morocco's readmission by saying it was "a chance to work together" and suggesting it would push the AU to take actions "with regard to a referendum in Western Sahara".
Kicking out the Sahrawis was always a red line for Morocco's detractors, and the AU leadership can be credited with avoiding a divisive vote on the issue at this time. Morocco appears to have just accepted this, at least for now - perhaps as part of an overall more conciliatory approach to the issue after its dramatic fallings out with the EU and UN in 2016.
"It was a small victory for Polisario that the King had to accept sitting down in the same room as them, something that historically Morocco has said it would never do" says Louw-Vaudran.
Celeste Hicks is a freelance journalist based in Morocco.