Guinea-Bissau reached an Africa Cup of Nations finals for the first time in their history without kicking a ball on Sunday, as Zimbabwe and Ghana also qualified for Gabon 2017.
Kenya beat Guinea-Bissau's closest challengers Congo Brazzaville 2-1 in Group E to secure an historic qualification for the African minnows who defeated Zambia on Saturday.
Zimbabwe were 3-0 winners over Malawi in Harare, and Ghana won 2-0 away to Mauritius.
|Grp H - Mauritius 0-2 Ghana (Q)||Grp J - Lesotho 1-2 Ethiopia|
|Grp B - Madagascar 1-6 DR Congo||Grp L - Swaziland 1-0 Guinea|
|Grp D - Comoros 0-1 Burkina Faso||Grp B - CAR 3-1 Angola|
|Grp E - Kenya 2-1 Congo - (Guinea-Bissau qualify from the Group)||Grp C - Benin v Eq Guinea (postponed)|
|Grp L - Zimbabwe 3-0 Malawi||Grp A - Liberia 2-2 Togo|
Guinea-Bissau, from the tiny former Portuguese colony in West Africa, bolstered their chances of a first Cup of Nations appearance after a 3-2 win over 2012 champions Zambia on Saturday in front of a packed 20,000-capacity national stadium in Bissau.
But they needed Congo Brazzaville to lose in Kenya to seal their place in Gabon, and Kenya duly obliged, coming from behind to seal a 2-1 victory in Nairobi.
Congo took an early lead in the Group E match through Ismael Gonzalez who converted a 19th minute penalty.
But the Harambee Stars came back with goals from Ayub Timbe and Eric Johanna to seal Guinea-Bissau's qualification.
Guinea-Bissau, captained by France-based Bocundji Ca (pictured) have 10 points in Group E, four more than Zambia and Congo Brazzaville. Kenya are bottom, two points further adrift.
Guided by local coach Baciro Cande, Guinea-Bissau - who have never been inside the world's top 100 in the Fifa rankings - were considered outsiders when qualifying kicked off last June.
They have a population of just 1.7 million and no professional league, and with their financial problems they have regularly been unable to enter teams in continental competition.
But home and away victories over Kenya three months ago helped them upset the odds to win the group.
Ghana went into their game away to Mauritius as favourites to win Group H even without captain and leading striker Asamoah Gyan, who has a thigh injury.
The Black Stars did not disappoint despite a cagey first half which ended without any goals.
Swansea's Andre Ayew (pictured) broke the deadlock in the 71st minute with a strike from close-range to relieve some of the tension.
Christian Atsu doubled Ghana's score seven minutes later, finding the net following a pass from defender Baba Rahman.
The victory means that Ghana have qualified for their seventh successive Africa Cup of Nations finals since 2006.
Zimbabwe clinched a place at Gabon 2017 with a 3-0 win over Malawi in Harare while their Group L rivals Guinea fell 1-0 in Swaziland.
Knowledge Musona was fouled inside the box and converted the penalty on 16 minutes to set up the convincing home victory for the Warriors.
Recently crowned South African Footballer of the Season, Khama Billiat, doubled the lead on 36 minutes, firing in from close range.
Roared on by a 40,000 crowd at the national stadium, Zimbabwe struck again a minute from time through a Cuthbert Malajila header.
In Group B, the Democratic Republic of Congo moved closer to the finals with a resounding 6-1 win in Madagascar but Central African Republic's 3-1 win over visiting Angola stopped DR Congo from qualifying.
Cedric Bakambu and Paul-José M'Poku both hit a brace for DR Congo in Madagascar, with Crystal Palace's recently married winger Yannick Bolasie, and Jordan Rolly Botaka also scoring.
Jhon Baggio Rakotonomenjanahary did score a consolation goal for the hosts, but they remain bottom of the group with just two points.
CAR's win meant they closed the gap on DR Congo to two points with the group now set to be decided in the final round of qualifiers in September.
It is a similar situation in Group D where Burkina Faso beat Comoros 1-0 on Sunday to go joint top with Uganda ahead of the last round of qualifying.
Group A will also be decided in the final round, after Liberia drew 2-2 with visitors Togo to go joint top with Tunisia.
Togo came from 2-0 down to secure a precious point.
Gizzie Dorbor and William Jebor put Liberia in front before Floyd Ayite and Kodjo Laba drew Togo level.
Liberian players were holed up in their dressing room for more than an hour after the match to avoid an angry crowd waiting outside the stadium.
Elsewhere, two goals from Getaneh Kebede helped Ethiopia win 2-1 away to Lesotho in Group J, to boost their hopes of finishing as one of the best runners-up.
The Group C game between Benin and Equatorial Guinea - originally scheduled for 5 June - has been postponed until Sunday 12 June. as long as Benin fulfil conditions set out by Fifa.
These are the penultimate qualifiers, with the group winners and the best two runners-up qualifying for the finals along with hosts Gabon.
Guinea-Bissau, Zimbabwe and Ghana join Morocco, Algeria, Cameroon, Senegal and Egypt as the nations who have already qualified.
The final round of group matches will be played in September.