Sadio Mane scored an injury-time winner which secured Senegal's qualification for the 2025 Africa Cup of Nations (Afcon) with two rounds of matches to spare.
The Teranga Lions were heading for a goalless draw away against Malawi before the former Liverpool forward, who now plays for Al Nassr in Saudi Arabia, struck in the 96th minute in Lilongwe.
Senegal move on to 10 points in Group L alongside Burkina Faso and have joined their fellow West Africans in booking a place at the 2025 Nations Cup in Morocco.
The 2021 Afcon winners progressed despite parting company with long-serving coach Aliou Cisse earlier this month.
DR Congo also sealed their spot at the finals on Tuesday as Meschack Elia scored twice late on to give them a 2-0 away win in Tanzania.
The Leopards, who finished fourth at the 2023 finals earlier this year, have won all four games in Group H without conceding.
Uganda moved to the brink of qualifying after a 2-0 win in South Sudan while Angola, Egypt, Ivory Coast, Mali and South Africa could also progress if they win their qualifiers later on Tuesday.
Cameroon and Algeria picked up their tickets for the 24-team tournament in North Africa with victories on Monday.
Boris Enow gave Cameroon a 1-0 win over Kenya in neutral Kampala while an 18th-minute penalty from Remy Bensebaini was enough for Algeria to triumph 1-0 against Togo in Lome.
The final two rounds of qualifiers will be held next month while the 2025 Nations Cup is scheduled to begin on 21 December next year, with the final on 18 January 2026.
Meanwhile, Ghana are in danger of failing to qualify for the Nations Cup for the first time since 2004 after slumping to a 2-0 away defeat against Sudan.
Fielding a strong team, captained by West Ham's Mohammed Kudus and including Antoine Semenyo of Bournemouth, the Black Stars were undone by two quick second-half goals.
Sudan forward Ahmed Al-Tash bundled the ball over the line for their first in the 62nd minute after Saif Teiri's shot rebounded off the post.
Mohamed Abdelrahman doubled the lead just three minutes later, running onto a through ball from Ahmed Yousif and slotting past Ghana goalkeeper Lawrence Ati Zigi.
The match was played in the Libyan city of Benghazi as Sudan cannot play at home because of the civil war in the country.
Ghana are now third in Group F with just two points from four games, and qualification is now out of their hands.
The Black Stars must now win their remaining games against Angola and Niger next month and hope that Sudan, who have seven points, lose both of theirs.
Morocco (hosts), Algeria, Burkina Faso, Cameroon, DR Congo, Senegal