Lausanne (AFP) - The Court of Arbitration for Sport (CAS) on Thursday scrapped sanctions dished out by the Confederation of African Football (CAF) to Morocco, freeing the North African country to play in the 2017 and 2019 Africa Cup of Nations.
CAF hit Morocco's football federation (FRMF) with the ban and a fine of $1 million (880,000 euros) after it decided not to host the 2015 Cup of Nations amid fears over the Ebola crisis.
CAS said it "has upheld the appeal in a large proportion".
"The sanctions imposed by the CAF on the FRMF have been set aside, with the exception of the fine, which is however reduced to $50,000."
CAF had also ordered the Moroccan federation to pay 8 million euros ($9m) "for damages caused to the Confederation of African Football (CAF) and partners".
And CAS, the highest appeal court in world sport, said the "question related to the compensation of the possible damage caused by the FRMF to the CAF may still be examined by another jurisdiction".
The Moroccan federation had called for the 2015 tournament, eventually moved at the last minute to Equatorial Guinea and won by Ivory Coast on February 8, to be delayed as concerns over the potential spread of the Ebola virus grew, and then declined to host it when that delay was not granted.
The African division of global players' union FIFPro have hit out at African football bosses for their treatment of Morocco.
And Morocco coach Badou Zaki insisted after the verdict that "justice had been done".
"The law was on our side," he said, adding: "Moroccan football remains the same but for its ambitions, instead of waiting until the 2018 World Cup, we'll focus on the 2017 Africa Cup of Nations.
"The national team is completely ready, it will fight to qualify."
Assistant coach Mustapha Hadji said CAS's decision was a "big relief".
"It's not good news, it's excellent news!" Hadji told AFP.