Six teams have secured their places in the 2027 Africa Cup of Nations finals, with Morocco qualifying as the first North African country after defeating Niger.