Tunisia and Angola played out a goalless stalemate in Tamale to qualify for the African Nations Cup quarter-finals while Senegal and South Africa bowed out on Thursday.
Angola, who will host the 2010 tournament, and 2004 champions Tunisia had both needed one point to advance from Group D and duly obtained it to finish on five points each with the Tunisians top on goals scored.
South Africa and Senegal had needed a win to retain slim hopes of reaching the last eight but finished with just two points apiece following a 1-1 draw in Kumasi.
In Monday's quarter-finals, Tunisia will meet Cameroon in Tamale while Angola, who have reached the last eight for the first time, take on defending champions Egypt in Kumasi.
The quarter-finals start on Sunday with hosts Ghana playing Nigeria at Accra's Ohene Djan stadium and Ivory Coast facing Guinea at Sekondi's Essipon stadium.
At the Tamale Sports Stadium, with a stalemate suiting both sides, there were precious few chances in a match which was often played at walking pace.
A hot, breathless evening also contributed to one of the worst games of the tournament so far.
SENEGAL SUSPENSIONS
At the Baba Yara stadium in Kumasi, South Africa and Senegal went all out for victory.
Elrio van Heerden opened the scoring for South Africa inside a quarter of an hour, finishing off a swift passing move unmarked at the back post.
Henri Camara equalised for Senegal eight minutes before halftime after a defensive slip by South Africa captain Aaron Mokoena allowed him through on goal.
Senegal goalkeeper Bouna Coundoul made a series of key saves in the second half to keep the lively South Africans at bay.
Coundoul came into the team after Senegal suspended first choice keeper Tony Sylva and captain El Hadji Diouf because of an unauthorised night out on the town earlier in the week.
Senegal were under the guidance of coach Lamine Ndiaye following Henryk Kasperczak's resignation after their ultimately decisive 3-1 defeat by Angola on Sunday.
"Being a new team I think we go back home with some positive things," said South Africa coach Carlos Alberto Parreira, who is preparing the Bafana Bafana to host the 2010 World Cup.
"We are satisfied with some things but for the World Cup of course we need to improve a lot more than here."