Ghana drew 1-1 with Guinea on Wednesday to finish top of Group D and qualify for the Africa Cup of Nations soccer quarter-finals.
The Black Stars garnered seven points from three matches, while Mali also joined them in the last eight after they beat Botswana 2-1 in the other Group D match in Libreville.
Mali have six points, while Guinea crashed out of the competition on four points. Botswana finished pointless.
On Sunday, Ghana will tackle Tunisia in one of the quarter-finals, while co-hosts Gabon take on Mali in the other in Libreville.
Against the run of play, Ghana went in front in the 28th minute through Emmanuel Badu with an unstoppable belter from outside the box.
He collected a short corner taken by Andre Ayew and, from 20 metres, he let fly to give goalkeeper Naby Yattara no chance.
It was Ghana’s 100th goal at the Africa Cup of Nations.
Dashing left winger Abdoul Razzagui Camara drew Guinea level in first-half stoppage time when his left-footed floater beat Ghana goalkeeper Adam Kwarasey.
Guinea were reduced to 10 men after Bah Dioulde was sent off after being booked for second time for a cynical foul on John Pantsil.
Guinea coach Michel Dussuyer was furious with the handling of the match by the South African referee Daniel Bennett.
‘Ghana are a great team but they did not need the help of the referee to qualify for the quarter-final,’ blasted Dussuyer.
‘I’m disappointed and angry because, in the first half, all the fouls were against us and the first yellow card Bah (Dioulde) got was not supposed to be.
‘And when then you have to play 10 against 11, it was always going to be very, very difficult for us.’
Ghana assistant coach, Kwesi Appiah admitted it was a tough match but was delighted they finished top of the group to stay put in Franceville.
‘Guinea are a good team and we knew it was never going to be easy against them,’ Appiah said.
‘Tactically, we played well and we finished top of our group.’
Mali set up their quarter-final with co-host Gabon after coming from behind against Botswana.
Mogakolodi Ngele gave Botswana the lead in the 50th minute, but Garra Dembele equalised in the 56th and Seydou Keita curled home the winner in the 74th to secure second place in Group D for Mali.
Botswana, needing a freak set of results to qualify, made Mali sweat after Ngele’s opener had briefly pushed Guinea into the second qualifying berth.
Mali’s players erupted in celebration when the result between Ghana and Guinea came through.