Benin will join Rwanda and Zimbabwe as first-time qualifiers at Tunisia after beating Zambia´s Chipolopolo in front of 40,000 people.
Oumar Tchomogo was the hero for Benin with two goals - before getting sent off later in the game.
Tchomogo got his first after just eight minutes, managing to control a short backpass to Zambian keeper Davis Phiri to slot home from 10 yards.
Benin doubled their lead in controversial circumstances 17 minutes later, when they were awarded a penalty kick following a foul on Laurent Djaffo.
The Zambian players walked off the pitch in protest at the decision.
/>
They finally retuned six minutes later and watched Tchomogo coolly notch his second.
Moussa Latoundji wrapped things up for Benin in the 67th minute and the stadium erupted.
The celebrations were not tempered by the late red card for Tchomogo, received as a result of a deliberate handball.
That card means Tchomogo will miss the first match of the finals in Tunisia.
A raucous crowd of about 40,000 people - dressed in the yellow and red of the national team - sang and cheered at the end of the match, staying at the stadium to celebrate long after the match ended.