PORT ELIZABETH, South Africa (AP) -- Mali again showed incredible resilience to come from behind and knock the host team out of the African Cup of Nations in a penalty shootout for the second straight year, joining Ghana in the semifinals on Saturday.
The Malians came from 1-0 down to level and then oust South Africa in their quarterfinal after a shootout, repeating the come-from-behind victory from last year when they surged past co-host Gabon and another partisan home crowd to make the last four.
Inspirational Mali captain Seydou Keita equalized in regular time after Tokelo Rantie gave South Africa the early lead in front of 50,000 in Durban. Goalkeeper Soumaila Diakite then saved two penalties and watched another go flying past his post to see the Malians through and again give their troubled country hope of a morale boosting first ever African Cup title.
"This victory means a lot to everyone in Mali," Keita said, with his nation's flag wrapped around him. "This is an emotional moment for me and this team. We did our job today ... we fought hard."
Ghana was the first team to make the semifinals when Wakaso Mubarak came off the bench to score twice and end Cape Verde's fairytale tournament with a 2-0 win in Port Elizabeth.
Mali will play Ivory Coast or Nigeria, and Ghana the winner of the Togo-Burkina Faso quarterfinal as the West African countries were left to dominate the final stages of the cup following South Africa's painful exit.
Striker Rantie put Bafana Bafana ahead in the first half at Moses Mabhida Stadium, but left injured before halftime and Mali's brave team clawed its way back under the outstanding leadership of Keita.
The skipper and former Barcelona midfielder headed in an equalizer in the 58th minute, but wasn't needed in the shootout as South Africa missed three consecutive spot kicks to go crashing out after substitute Siphiwe Tshabalala succeeded with the first.
Diakite saved from midfielders Dean Furman and May Mahlangu -- ironically two of South Africa's best players on the night -- and Lehlohonolo Majoro blasted his kick well wide to a stunned silence from the home supporters.
"Obviously there's major disappointment now," Furman said. "To lose on penalties the way we did is heartbreaking."
Like in 2012, Mali found inspiration from its troubled homeland to move a step closer to a first African title and a first visit to the final since its cup debut in 1972.
Wakaso was introduced as a 47th-minute substitute at Nelson Mandela Stadium in the tournament's first knockout game, then scored from a penalty in the 54th and added a second in injury time as Ghana made the last four for the fourth straight African Cup and ended Cape Verde's uplifting campaign in its first major tournament.
"Today we watched a beautiful game of football. Unfortunately the best team is going home tomorrow," Cape Verde coach Lucio Antunes said before conceding Ghana deserved its victory.
Wakaso took his opportunities clinically and the Cape Verdeans couldn't find a way past Ghana goalkeeper Fatawu Dauda despite dominating the second half, but still went down fighting when they sent everyone up to the other end of the field for a last-gasp corner.
After Ghana's defense cleared, Wakaso scored on the break, side-footing into an empty net as the Cape Verdeans were all searching desperately for a tournament-prolonging equalizer.
The Black Stars remained on course for a fifth African title and first in over 30 years.
Follow Gerald Imray at http://twitter.com/GeraldImrayAP