Morocco has been admitted as member of the Africa Union (AU) after months of intense lobbying.
Morocco left the organization in 1984 after it recognized the independence of Western Sahara, regarded by morocco as part of its historic territory.
BBC REPORTS that it was the only country in Africa that was not a member of the continental body.
AU leaders also voted for Chadian foreign minister Moussa Faki Mahamat to be the next head of the AU commission.
Mr. Faki Mahamat beat Kenya’s top diplomat Amina Mohamed.
The race is usually settled behind the scenes before the vote but this went to seven rounds of voting.
Outgoing commissioner, South Africa’s Nkosazana Dlamini-Zuma stayed in the job an extra six months after leaders failed to agree a candidate in July.
Mr. Faki garnered 39 votes in a hotly contested election at the ongoing heads of state summit in Ethopia’s Addis Ababa city.