CAIRO, July 8 -- Tunisia progressed to the quarterfinals of the Africa Cup of Nations (AFCON) on Monday after beating Ghana 5-4 on penalties at Ghanaat Ismailia Staduim.
Ferjani Sassi scored the winning penalty in inspiring fashion as Tunisia's Carthage Eagles flew over Ghana's Black Stars.
Tunisia will now face off with tournament surprise package Madagascar in Thursday's quarterfinal in Cairo's Al Salaam Stadium.
Substitute keeper Farouk Ben Mustapha proved a gamble by head coach Alaine Giresse to bring him on for the penalties to be right as he saved one of Ghana's kicks from Caleb Ekuban.
Tunisia all scored their penalties with Naim Sliti, Wahbi Khazri, Yassine Meriah and Dylan Bronn all scoring before Sassi sealed the tie.
Ghana's kicks were scored through Mubarak Wakaso, Jordan Ayew, Lumor Agbenyenu and Thomas Partey.
Substitute Rami Bedoui's own goal at the stroke of full time sent the game to extra time after he dipped a header beyond his keeper Hassen Mouez as he tried to defend a Mubarak Wakaso freekick.
Bedoui had just been brought on to try and safeguard Tunisia's 1-0 lead in the final minutes of the game, but his change was counter-productive.
Tunisia had gone ahead in the 72nd minute courtesy of a Taha Khenissi goal, but, the man who replaced him after 90 minutes undid the work he had done just 18 minutes earlier.
While it was Khenissi who scored Tunisia's goal in the regular 90 minutes, it was the experience of Wahbi Khazri off the bench that turned the game into Tunisia's favor.
With Tunisia's late own goal, the game was forced into extra time and even then, it was a full contest despite the tired legs. Khazri forced a great save off Ofori with a strong shot from the edge of the area while Jordan Ayew fluffed Ghana's best chance of the extra 30.