A superb late free-kick from Alain Traore secured Burkina Faso a 1-0 victory over Ghana in the Africa Cup of Nations third-place play-off at Stade de Port-Gentil.
The match seemed destined to be settled on a penalty shoot-out when, with just a minute of normal time remaining, Stallions forward Traore whipped a free-kick from the right up into the top-left corner.
Black Stars manager Avram Grant, who is expected to step down from his role following the tournament in Gabon, had made several changes from the starting XI which lost the semi-final to Cameroon, while Paulo Duarte named a strong side as Burkina Faso looked to recover from their penalty shoot-out defeat against Egypt in Libreville.
Emmanuel Agyemang-Badu headed an early chance wide for the Black Stars before Thomas Partey was unfortunate to see his effort come back off the crossbar.
As half-time approached, the Stallions broke on a swift counter through Prejuce Nakoulma, but the Nantes frontman shot wide.
Ghana were on the offensive again at the start of the second half when Jordan Ayew, the Swansea forward, got into the right side of the penalty area, only to fire an angled drive high over the crossbar.
Atletico Madrid midfielder Partey went close on the hour when his header from a free-kick was just over.
Burkina Faso, though, grew into the closing stages.
Substitute Cyrille Bayala sprinted clear down the left before his curling shot was palmed away by Ghana goalkeeper Richard Ofori, who then saved another effort from Nakoulma.
The breakthrough finally came in the 89th minute when Kayserispor midfielder Traore whipped a 20-yard free-kick from the right up into the top-left corner.
In stoppage-time, Ghana had a golden chance to level and force a penalty shoot-out, but Leicester defender Daniel Amartey sent an unmarked header wide from six yards.
SKY