Co-hosts Gabon beat Tunisia 1-0 on Tuesday to finish top of Africa Cup of Nations Group A with a perfect nine points from three matches.
The Panthers will play the runners-up in Group D in Libreville on Sunday, while Tunisia, who finished second in the group will face the winners of Group D.
Pierre-Emerick Aubameyang gave Gabon the lead after 62 minutes when he collected a loose ball before wrong footing Tunisia goalkeeper Rami Jeridi for his third goal of the competition.
Skipper Daniel Cousin could have doubled the co-hosts lead in the 67th minute but his shot from a rebound was well off target as Gabon seemed to be a revived team after the recess.
The north Africans fought to restore parity but the home team were resolute in defence to hold on for another famous victory.
Tunisia rested several of their top stars including goalkeeper Aymen Mathlouthi, skipper Karim Haggui, Khaled Korbi and Mejdi Traoui as they would have missed the quarter-finals had they been booked.
All the same, the 2004 champions played with ease despite the wet conditions at the Franceville Stadium and after seven minutes Youssef Msakni fired a low drive from distance which was cushioned by Gabon goalkeeper Ovono.
Watch the Goals here:
Gabon 1-0 Tunisia