The Gambia qualified for their first ever Africa Cup of Nations tournament when beating Angola 1-0 at home, joining Comoros, Gabon, Ghana, Egypt, Zimbabwe and Equatorial Guinea in qualifying on Thursday.
Assan Ceesay scored the all-important match-winner after an hour, enabling The Gambia to clinch one of the two places from Group D.
The other slot was secured by Gabon who beat DR Congo 3-0 to ensure that they return to the finals after missing out on the 2019 edition.
Pierre-Emerick Aubameyang, Denis Bouanga and Aaron Boupendza scored the goals for the Panthers.
The Congolese, meanwhile, miss out for the first time since 2012, having appeared at the last four tournaments.
Elsewhere, Egypt drew 1-1 in Kenya to secure the point they needed in Group G to qualify for the finals in Cameroon.
The Pharaohs now have nine points, level with Comoros, while Kenya move up to four and join Togo, who have just the two, in being eliminated with one round of games still to go.
Egypt opened the scoring in Nairobi after just two minutes through playmaker Magdi Afsha before Abdallah Hassan equalised midway through the second half for the hosts, who had Johnstone Omurwa sent off.
Comoros qualified earlier on Thursday when drawing 0-0 at home to Togo to also reach their first Nations Cup finals.
Teams that have never reached the tournament before have profited from the decision to expand the Nations Cup from a 16-team event to one featuring 24 teams for the 2019 finals onwards.
Reaching the finals has rarely been a problem for Ghana who drew 1-1 in South Africa to make it through from Group C.
Mohammed Kudus gave Ghana, playing at the stadium where they lost their infamous 2010 World Cup quarter-final against Uruguay, the lead after 180 seconds into the second half with Percy Tau replying just four minutes later.
The Black Stars – who have contested all but one of the last 15 tournaments – move up to ten points, level with South Africa who travel to Sudan, who have nine points, on the sixth and final day.
With Ghana having a better head-to-head record against both the Sudanese and Bafana Bafana, there is no scenario whereby the four-time African champions cannot go through.
Zimbabwe won 1-0 away in Botswana which – coupled with Zambia’s 3-3 draw at home to reigning champions Algeria – means Zimbabwe join the holders as qualifiers from Group H. Zambia, the 2012 winners, are eliminated.
In another late result, Emilio Nsue scored in the final minute to snatch a 1-0 win for Equatorial Guinea over Tanzania in Malabo, securing qualification for the hosts from Group J.
Tunisia, who triumphed 5-2 in Libya, had already booked their qualification from Group J. Despite the heavy loss, Libyans were thrilled at being able to watch the national team play at home after a seven-year ban.
More than half the teams at next year’s finals are now known with Comoros, Gabon, The Gambia, Ghana, Egypt, Zimbabwe and Equatorial Guinea joining Algeria, Burkina Faso, Guinea, Mali, Senegal, Tunisia and hosts Cameroon in January’s tournament.