Guinea-Bissau and Namibia qualified for the 2019 Africa Cup of Nations from Group K on Saturday, with Mozambique narrowly missing out after the final round of qualifying matches.
Guinea-Bissau made it back-to-back Nations Cup appearances after a dramatic 2-2 draw at home to Mozambique.
Namibia secured their place at Egypt 2019 despite a 4-1 defeat away to the 2012 champions Zambia who had already been eliminated.
A dramatic stoppage-time equaliser from Frederic Mendy secured Guinea-Bissau top place in Group K after a 2-2 draw at home to Mozambique.
Mozambique were headed to the finals along with Guinea-Bassau as they came from behind to lead 2-1 thanks to an 89th-minute goal from substitute Nelson.
But they conceded an equaliser to Mendy four minutes into stoppage time and the 2-2 result left them level with Namibia on eight points.
Namibia, despite being thrashed 4-1 by Zambia in Lusaka, qualified in second place in Group K ahead of Mozambique on the head to head results between the two countries.
Namibia's match finished minutes earlier and their players anxiously watched live action from the other game on an i-pad on the side of the field, before celebrating when they realised they had also qualified.
The 2019 Africa Cup of Nations hosts, Egypt, were held to a 1-1 draw away to Niger, in the final qualifier of Group J on Saturday.
Egypt had already qualified for the finals and faced a Niger team who had already been eliminated.
Egypt replaced Cameroon as 2019 hosts in January.
Pharaohs coach Javier Aguirre fielded an experimental Egypt side in Niamey with many top stars missing, including Liverpool's Mohamed Salah.
After a goalless first half, the visitors took the lead as substitute Mahmoud Trezeguet struck just after the break to put Egypt ahead.
Niger missed a penalty eight minutes later, but they did get their equaliser thanks to Amadou Moutari in the 82nd minute.
Tunisia - who beat eSwatini 4-0 on Friday night - finished top of Group J on 15 points with Egypt second, two points adrift.
Elsewhere on Saturday, Jeffrey Schlupp scored eight minutes from time to give Ghana a 1-0 home win over Kenya in Group F. Both teams had secured qualification last year.
Senegal and Mali completed their campaigns unbeaten with home wins on Saturday.
Mbaye Niang scored twice as Senegal beat Madagascar 2-0 in Group A and Mali overcame South Sudan 3-0 in Group C.
Manchester United defender Eric Bailly was among the scorers as Ivory Coast beat visiting Rwanda 3-0 in Group H.
Earlier, Burundi secured their first ever Nations Cup qualification with a 1-1 draw against Gabon who are eliminated.
Also on Saturday, Cameroon were 3-0 winners over Comoros in Yaounde, to keep the defence of their Africa Cup of Nations crown alive.
On Friday, Angola sealed their place at the finals in Egypt with a 1-0 win away to Botswana in their final match of Group I.