Ghana reach the final eight of the African Nations Cup after claiming the second qualifying ticket from Group B.
The Black Stars secured a crucial 1-0 win against Burkina Faso to progress to the quarter-final alongside Ivory Coast. Ghana will play against hosts, Angola in Luanda on Sunday.
Ghana finished with three points after two games, one behind Ivory Coast. Burkina Faso finished with one point. Togo withdrew from the tournament after an armed attack on the team bus killed two members of its delegation.
Ayew met a cross from Samuel Inkoom on the right side of attack and directed it past the Burkina Faso goalkeeper Diakete after 30 minutes.
Ghana, four-time African Champions needed a win to progress to the final eight of the competition after getting their campaign off to a stuttering start, losing 3-1 to Ivory Coast in Group B.
Despite a rather slow start, Ghana appeared to have finally warmed themselves into the competition as they matched the physical game of the Burkina Faso side who finished with ten men following a red card to Hamadou Tall in the second half.
The opening half saw four yellow cards with three going against Burkina Faso.
Agyemang-Badu was Ghana's second player to enter referee Eddy Maillet's books after picking up a yellow card as the Black Stars failed to increase the score against a numerically challenged side.
In the absence of the injured Michael Essien who watched proceedings from the stands, Milovan Rajevac made four changes from the side that started against Ivory Coast last Friday, with Asamoah Gyan, Hans Adu Sarpei, Haminu Draman and Lee Addy all coming in.
But before the final kick, Dominic Adiyiah was handed his Nations Cup debut as Rajevac sent him on for Mathew Amoah.
Two other changes were made with Asamoah Gyan and Haminu Draman giving way to Ibrahim Ayew and Opoku Agyemang.
Starting team: Richard Kingson, Samuel Inkoom, Hans Adu Sarpei, Lee Addy, Isaac Vorsah, Emmanuel Agyeman-Badu, Haminu Draman/Opoku Agyemang, Kwadwo Asamoah, Mathew Amoah/Dominic Adiyiah, Asamoah Gyan/Ibrahim Ayew, Andre Ayew
Subs: Philemon McCarthy, Ibrahim Ayew, Moussa Narry, Ransford Osei, Jonathan Mensah, Opoku Agyemang, Anthony Annan, Eric Addo, Daniel Adjei, Dominic Adiyiah, Harrison Afful