Burundi qualified for the African Nations Cup finals for the first time as they kept Gabon striker Pierre-Emerick Aubameyang in check to get the point they needed in a 1-1 draw on Saturday.
The result secured them second place in Group C to join Madagascar and Mauritania as countries going to the finals for the first time and their achievement sparked wild celebrations in the tiny east African country.
They were joined later on Saturday by Cameroon, Guinea Bissau and Namibia, who qualified despite losing 4-1 to Zambia in dramatic circumstances.
While Burundi needed only a draw, visitors Gabon, who hosted the last finals in 2017, had to win in Bujumbura to join group winners Mali in the expanded 24-team finals in Egypt in June and July.
Burundi were kept at bay repeatedly by the heroics of Gabon's veteran goalkeeper Didier Ovono before Cedric Amissi broke the deadlock in the 75th minute.
Yet celebrations were on hold until the final whistle as Gabon equalised with eight minutes left when Burundi defender Omar Ngandu turned the ball into his own net.
Gabon's Arsenal striker Aubameyang had a largely quiet afternoon and they were unable to get the second goal they needed to reach the finals.
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 Bissau 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.
Defending champions Cameroon, originally named hosts of the 2019 finals before the tournament was moved to Egypt due to concerns over preparations, confirmed their qualification with a 3-0 home win over Comoros Islands.
Comoros had written to the Confederation of African Football asking for Cameroon to be disqualified after they were stripped of the right to host the competition.
The Indian Ocean islanders needed a win to usurp Cameroon in the group but were never in the match in Yaounde.
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 and Mali overcame South Sudan 3-0.
Manchester United defender Eric Bailly was among the scorers as Ivory Coast beat visiting Rwanda 3-0 but Egypt, who allowed Liverpool forward Mohamed Salah to miss the match, were held 1-1 at lowly Niger.
The last five places at the finals will be decided when qualification wraps up with seven games on Sunday.
The 19 countries qualified are: Egypt (hosts), Algeria, Angola, Burundi, Cameroon, Ghana, Guinea, Guinea Bissau, Ivory Coast, Kenya, Madagascar, Mali, Mauritania, Morocco, Namibia, Nigeria, Senegal, Tunisia and Uganda.
On Friday, Angola striker Wilson Eduardo scored on his debut as they beat Botswana 1-0 to qualify.