Co-hosts Gabon finished top of Group C at the Africa Cup of Nations after beating Tunisia 1-0 in Franceville.
Pierre-Emerick Aubameyang struck his third of the tournament, with some assistance from reserve Tunisia keeper Rami Jeridi.
Captain Daniel Cousin set up Aubameyang, who gently stroked his shot goalwards but was helped by the legs of Jeridi, who dived away from the shot.
Tunisia failed to spark, but go through second in Group C, behind the Panthers.
Both sides started the night already through to the quarter-finals, but Gabon needed at least a draw to ensure they returned to their capital Libreville for their last eight tie.
Panthers coach Gernot Rohr sent out a strong side, with just four changes to the team which started the stunning 3-2 win over Morocco on Friday, with Daniel Cousin - who was so influential as a substitute against the Atlas Lions - restored as captain against the Tunisians.
Tunisia started brightly, with Sabeur Khalifa - one of eight changes by coach Sami Trabelsi - creating space well for himself, but firing straight at the side-netting at the near post.
Cousin hussled and harried the Tunisian defence from the outset, and collided with reserve Tunisian goalkeeper Jeridi - who looked shaky all night - early on.
Aubameyang was also busy upping the tempo of the game, with the Panthers midfield attempting to find him in behind the Tunisian defence, but unable to deliver the right ball.
Approaching the break, Gabon found the level they showed to dramatically turn Friday's game against Morocco on its head.
Mbanangoye broke into the box at pace, then swapped feet and delivered a dangerous in-swinging ball for Aubameyang, who could not quite get enough on it to direct it goal-wards.
Tunisia picked up their first yellow card, with Anis Boussaidi going in the book for one of a series of niggly fouls to come from the Carthage Eagles.
Cousin and Tunisia defender Aymen Abdennour also continued to clash, with the Gabonese captain repeatedly colliding with his marker and the two exchanging numerous words.
Tunisia captain Issam Jemaa started the second half on the front foot for the Tunisians, but saw two opportunities charged down in quick succession.
Gabon once more regained the upper hand, however, and made their superior attacking play count as Aubameyang latched onto Cousin's headed flick-on and shot calmly at Jeridi, who should have done a lot better, but the helped the ball on its way into the net, on 62 minutes.
Aubameyang deserved the winner for his workrate alone, and moved to joint top-scorer, along with Angola's Manucho and Morocco's Houssine Kharjah - whose teams are both out, with Kharjah's side following the Angolans out of the tournament with a consolation 1-0 win over Niger.
The Tunisians had no reply and will look to re-discover their form in the quarter-finals, with many of their first team likely to be reinstated.
Gabon, meanwhile, celebrated an impressive three wins from three and will return to Libreville full of confidence to contest their last eight tie.
Gabon coach Rohr praised his players for maintaining their motivation with qualification already secured.
"It was not easy because we were already qualified for the quarter-finals," he said.
"But thanks to the professional attitude and fighting spirit of the players, we won to finish top of the group."
Tunisia coach Trabelsi said he made so many changes to protect his players already on bookings.
"We rested some of the players because they have already been booked and we did not wish to risk them before the quarter-finals," he said.
"However, those who played today showed many good qualities because we played well but we could not win the match."