Mauritania won and Ethiopia were trailing in an abandoned match as they secured places Tuesday at the 2021 Africa Cup of Nations, raising the number of qualifiers to 21 for the 24-team tournament.
Ethiopia were losing 3-1 to already-qualified Ivory Coast in Abidjan after 80 minutes when the Ghanaian referee collapsed and the visiting team refused to continue under the fourth official, an Ivorian.
The Ivorian was a late pre-match replacement after the original referee from Ghana withdrew, leading to his compatriot being promoted from fourth official to match referee.
Referee Charles Bulu received treatment at the national stadium before being taken to hospital. His condition was not immediately known.
Madagascar needed maximum points to overtake Ethiopia in Group K, but the Indian Ocean side were held 0-0 by Niger in Toamasina.
In Abidjan, the Ivorians quickly built a two-goal advantage as Willy Boly scored and Franck Kessie converted a penalty.
Getaneh Kebede halved the deficit on 74 minutes only for Jean Kouassi to score a third goal for the Ivory Coast almost immediately.
Madagascar, who surprisingly reached the Cup of Nations quarter-finals when they debuted two years ago, attacked relentlessly but could not break down Niger, who conceded six goals when the sides last met.
An Aboubakar Kamara goal in first-half stoppage time earned Mauritania a 1-0 victory over the Central African Republic in Bangui and the second qualifying place in Group E behind Morocco.
It will be the second successive appearance at the finals of the premier African national team competition for the Mauritanians, who are coached by Frenchman Corentin Martins.
The remaining three places will be filled later Tuesday with Congo Brazzaville and Guinea-Bissau (Group I), Sierra Leone and Benin (Group L) and Cape Verde, Rwanda and Mozambique (Group F) in contention.
Algeria, Burkina Faso, Cameroon, Comoros, Egypt, Equatorial Guinea, Gabon, Gambia, Ghana, Guinea, Ivory Coast, Malawi, Mali