Huddersfield striker Steve Mounie scored the goal to send Benin to the 2019 Africa Cup of Nations after a 2-1 victory over Emmanuel Adebayor's Togo in Cotonou.
In the final round of qualifiers, Benin secured the points they needed to finish as runners-up to Algeria in Group D and secure their place at Egypt 2019.
Benin opened the scoring against Togo in the 12th minute when David Djigla put the hosts in front.
Veteran Togo striker Adebayor, 35, gave Togo hope with an equaliser in the 72nd minute as his side searched for the victory they needed.
It made for a frenetic finish to the contest and the host nation made it a disappointing end to Adebayor and Togo's campaign as Mounie struck seven minutes from time to give Benin the win.
Benin will play at the Nations Cup finals for the first time since 2010.
The 2019 Africa Cup of Nations will, for the first time, take place in June and July and will feature 24 teams rather than 16.
Also on Sunday, Zimbabwe and DR Congo qualified for the finals, as did Tanzania who beat rivals Uganda 3-0.
In Bangui, it finished 0-0 between Central African Republic and Guinea in Group H, a fixture featuring two teams who have already been eliminated.
Have your say
More Sports Headlines
- Senegal v Algeria: kick-off time, team news, head to head, form and more
- Ghana to face South Africa in AFCON 2021 qualifying
- Amaju Pinnick dismissed as Caf vice-president
- Mikel Obi retires from international football
- A fifth “All-African Coaches” AFCON final
- Juventus sign De Ligt on five-year deal
- AFCON 2019: Ighalo hands Nigeria bronze
- Atletico Madrid sign Tottenham defender Kieran Trippier
- Kotoko midfielder Kwame Bonsu completes move to Esperance
- CAF adopts one-leg finals for club competitions
- Real Zaragoza sign Raphael Dwamena from Levante
- Caf expands Women's AFCON to 12 teams
- Tunisia v Nigeria: kick-off time, team news, head to head, form and more
- Blatter labels Samoura's Caf move 'colonialist'
- Pernell Whitaker was unique - Eddie Pappoe