Tunisia scored late in each half to triumph 2-0 against Senegal on Tuesday in a top-of-the-table African Nations Championship Group D clash and secure a quarter-finals place.
Angola also advanced to the knockout stage in Sudan by coming from behind against lowly Rwanda to win 2-1 and snatch second spot in the final standings after another dramatic day at a tournament for home-based players.
Tunisia collected seven points from three games, Angola five and Senegal four, while Rwanda shared with Uganda and Ghana the humiliation of heading home having suffered three consecutive losses.
Defending champions and title favorites the Democratic Republic of the Congo await Tunisia in the quarter-finals on Saturday, while Angola face impressive Group C winners Cameroon earlier the same day.
Goal-shy Sudan tackle Niger and shock Group B table-toppers South Africa confront Algeria in the other fixtures a day earlier, with the destiny of the trophy in the melting pot.
Tunisia and Senegal entered the final day of group action with four points each, while Angola had two and Rwanda none and had the co-leaders drawn they would have progressed unless Angola went on an unlikely goal spree, but Senegal fell behind in the final minute of the first half in Port Sudan on the east coast of the host country when Slama Gasdaoui notched his second goal of the championship.
A tense finish saw Senegalese hopes of equalizing nosedive when Mame Thioune was red-carded, before Khaled Korbi put the result beyond doubt with a second goal two minutes from time.
It was the second consecutive victory for Tunisia, whose preparations were disrupted by political unrest that led to former president Zine El Abidine Ben Ali fleeing the country to Saudi Arabia.
The Sami Trabelsi-coached team defeated Rwanda 3-1 last Friday after conceding a stoppage-time goal to draw 1-1 with Angola in their opening encounter.
After draws with Tunisia and Senegal, Angola had to overcome Rwanda, but they fell behind 18 minutes into the opening half when Jean-Baptiste Mugiraneza was on target in Omdurman, across the river Nile from the capital Khartoum.
Arsenio “Love” Cabungula steadied Angolan nerves with a 31st-minute equalizer and Carvalho Osorio scored what proved to be the winning goal 12 minutes into the second half.