Aristide Bance was Burkina Faso's hero as he sealed a 3-2 play-off first-leg win over Algeria with a late penalty.
The Fortuna Dusseldorf striker made up for a first-half miss from the spot when he converted a controversial 86th minute spot-kick after Essaid Belkalem was controversially adjudged to have handled inside the area.
Jonathan Pitroipa opened the scoring for Burkina Faso on the verge of half-time but their lead was quickly cancelled out by Sofiane Feghouli.
Djakaridja Kone put the hosts back in front just after the hour, but Algeria again responded quickly through Carl Medjani's towering header.
Bance scored with just four minutes to play though, as his late penalty delighted the home crowd in Ougadougou.
Burkina Faso now have the advantage heading into the second leg, to be played in Blida on November 19.
Both sides struggled to create chances of note in the opening 30 minutes of the match, however as the game drifted towards the break it burst into life.
First, Burkina Faso survived a penalty shout after Feghouli went down under a challenge from Jean-Noel Lingani, however the Valencia midfielder saw his penalty claims waved away by the referee.
A minute later the referee was pointing to the spot, but at the other end, after Pitroipa was brought down by a rash challenge from Belkalem.
Bance stepped up to take the penalty but hit a tame effort that Algeria goalkeeper Adi Mbolhi saved relatively comfortably.
Luckily for Bance, his miss was quickly forgotten as Pitroipa struck in stoppage time at the end of the half.
Lingani delivered a cross into the penalty area from deep and Pitroipa – who had got away from Madjid Bougherra – headed past Mbolhi to give the hosts the lead.
The visitors were level early in the second half as Feghouli netted his third goal of qualifying with a low shot after neat link-up with Islam Slimani inside the penalty area.
Despite Algeria's second-half dominance they found themselves behind again in the 65th minute as Kone produced a moment of magic.
The midfielder controlled a loose ball on his chest, took the ball past Mehdi Mostefa-Sbaa and lashed the ball into the bottom corner for his second international goal.
Burkina Faso's lead only lasted three minutes though as Medjani rose to meet a left-wing corner to head past goalkeeper Daouda Diakite.
The hosts would not be denied though, claiming the winner with four minutes left after Belkalem was penalised for handling the ball.
It was not referee Janny Sikazwe who gave the penalty though, instead his assistant, and although Mbolhi got a hand to Bance's effort, it was second time lucky for the Burkina Faso man.
|Coach: P. Put|
for Bakary Koné 8'
for J. Lingani 68'
for M. Koffi 78'
|Tevez stands up for Messi: The AFA is a mess|
|Nani: Sanches snubbed United for Bayern|
|Hazard still hopeful of future Belgium glory|
|Messi will play at the 2018 World Cup - D´Andrea|
|Taylor: Portugal probably wanted Wales - they won´t now|
|Euro 2016 Social Round-Up: Wonderful Wales stun Belgium|
|Blomqvist: Ibrahimovic will set United standards|
|Coleman: Wales bossed it after going behind|
|Robson-Kanu: Wales on cloud nine after quarter-final win|
|Wilmots: Strategy was not the problem|
|Williams: We do it for the fans|
|Allen: It will take something special to stop Wales|
|Fearlessness the key to Wales success - Coleman|
|Euro 2016 Diary: Lille highs, training-ground Lows and a Spanish mover and shaker|
|Rejuvenated Ramsey writes Wales´ greatest ever story|
|Germany midfielder Ozil out to end Italy woe|
|Wales 3 Belgium 1: Robson-Kanu, Vokes seal thrilling quarter-final triumph|
|Buffon: It would be offensive to compare myself to Neuer|
|Low not surprised by impressive Italy|
|Germany the most complete side in the world - Conte|
|Watford seal club-record Success deal|
|Swansea takeover ratified by Premier League|
|United move is like Mayweather-Pacquiao fight - Ibrahimovic|
|Father: Pogba wants to play in a better league|
|87 wins in 114 games to seal World Cup, Euro glory - Del Bosque´s Spain successor has big shoes to f|
|Ben Arfa: I was 10 mins away from joining Sevilla|
|Everton seal Stekelenburg deal|
|Pele wants Messi to reconsider international retirement|
|Ibrahimovic completes Manchester United move|
|Wales-Belgium kick-off on schedule despite travel chaos|
|´Manchester, welcome to ZLATAN´ - Fun poked at City over imminent Ibra deal|
|Cuca ´fears´ reported Barca and Inter target Gabriel Jesus getting Brazil call|
|Pjaca denies Inter medical|
|Les Bleus inspiring France´s forgotten youth|
|Le Tissier urges Puel to exercise transfer caution|
|Demichelis and Wright depart Man City|
|Huddlestone pens new Hull deal|
|France v Iceland: Bodvarsson sees Les Bleus as step up from England|
|Wilson signs new Bournemouth contract|
|Euro 2016 exit won´t derail Spain, says Mendieta|
|Newcastle sign Ritchie from Bournemouth|
|Neymar gets new lease of life as Barcelona plot for Messi´s succession|
|Watford hand Deeney new five-year deal to end exit rumours|
|UEFA opens disciplinary proceedings against Portugal and Poland|
|Kimmich confident Germany can overcome Italy hoodoo|
|Sagna: I don´t want to upset the French public|
|PSG clinch Ben Arfa deal|
|Krychowiak expects PSG deal to be completed shortly|
|Crystal Palace sign Mandanda from Marseille|
|Sagna hails Nolito qualities after City swoop for Spain star|
|Neymar ends exit talk by penning new Barca deal until 2021|
|Kabasele joins Watford on five-year deal|
|Lagerback: Iceland will give France questions to answer|
|Bartomeu sure Messi will renew, but no Luis Enrique talks|
|Hummels reveals Klopp fights|
|Pardew: I want to manage England - but not now|
|De Jong: I haven´t retired from Netherlands duty|
|Palace complete £13m Townsend signing|
|Pato, Falcao and Amelia leave Chelsea|
|Barzagli, Bonucci and Chiellini - the latest Italy wall looking to deny Germany|
|Nolito´s Manchester City move confirmed|
|Coleman heaps praise on Williams|
|Sanchez reveals gruesome update of ankle injury|
|Ronaldo: We all feel abandoned by retiring Messi|
|Ibrahimovic arrival makes Manchester the ´capital of football´ - Vieira|
|Del Bosque: I sent a message to the whole squad, except Casillas|
|USA to play first friendly against Cuba since 1947|
|Poland boss praises Lewandowski after Euro 2016 exit|
|Fonte: United will regret missing out on Sanches|
|Santos: Portugal should have had a penalty|
|Ranieri: English football is not in crisis|
|Ronaldo dreaming of Euro 2016 glory|
|Nawalka: Poland should be proud of Euro 2016 exploits|
|Santos: Goalless Ronaldo was immense for Portugal|
|No player out of reach for Chinese Super League - chief|
|Fearless Sanches had no nerves in dramatic shootout|
|Portugal through despite Ronaldo off-night|
|´Very happy´ Neymar drops contract hint|
|Poland 1 Portugal 1 (aet, 3-5 pens): Heartbreak for Blaszczykowski as Santos´ men sneak into the sem|
|Del Bosque to resign from Spain role|
|Giggs can be a manager in his own right, insists Round|
|Euro 2016 Diary: Wails for Bale, a grumpy water carrier and the inevitable return of Will Grigg|
|Manchester United agree Galatasaray friendly|
|Hazard must bloom into bona-fide superstar as Eden project comes full circle|
|Hazard excited by ´world class´ Ibrahimovic in the Premier League|
|Hazard determined to make his mark on Lille return|
|Special One and Zlatan: United´s match made in heaven or gamble from hell?|
|Vertonghen to miss rest of Euro 2016 due to torn ankle ligaments|
|Conte has helped me a lot, admits grateful De Sciglio|
|Juve pay tribute to departing Caceres|
|Williams banking on ´band of brothers´ to stop Hazard|
|No lack of desire with England - Lampard|
|Germany v Italy: Kroos calls on Khedira knowledge for Azzurri test|
|Coleman welcomes pressure of ´biggest game since 1958´|
|Ibrahimovic claims he will join Manchester United|
|Sevilla receive ´big offer´ for Krychowiak|
|Bartra seeks to justify Dortmund´s trust|
|Montella vows to bring the good times back to AC Milan|
|Bournemouth bring in striker Mousset|
|Barca confirm Umtiti fee agreed|
|Puel takes charge at Southampton|
|Hulk completes €55.8m Shanghai SIPG switch|
|Bruce focused on Hull and pursuing transfer targets|
|Sinclair agrees Watford move|
|Janssen wants AZ to accept Spurs offer|
|Bartomeu claims five-year Neymar deal imminent|
|Reluctant father figure Evra defends Pogba|
|Boateng declares himself fit to face Italy|
|73 goals, 44 assists: The stats that show why Man Utd want Ibrahimovic and Mkhitaryan|
|Conte has made Italy proud again – Vieri|
|Evra pledges to respect Iceland after England shock|
|Vrba leaves Czech Republic for Anzhi|
|Bernstein backs Allardyce for England job|
|Rodgers rejects England talk|
|Klose lauds ´unbelievable´ Italy|
|Muller confident Italy´s defence can be breached|
|´Lineker does not know what he is talking about´ - Raiola defends Pogba|
|Morrison opts to stay with West Brom|
|Kempes expects Messi to return to international football|
|´Leave Messi alone!´ - Maradona|
|Evra suffers training injury|
|Iceland´s Viking chant terrified England - Shilton|
|Ballack doubts Italy can repeat Spain performance|
|Caparros hoping Del Bosque continues as Spain coach|
|Falcao targeting Ligue 1 top scorer award|
|Maradona: England continue to be over-hyped|
|Santos: You talk about Ronaldo because he is great|
|James Rodriguez is an ´average player´ - Stoichkov|
|Mooy moves from Melbourne to Manchester City|
|Copa America champions Chile set to face Euro 2016 winner|
|Guardiola ´relaxed´ ahead of renewing Mourinho rivalry|
|Simeone on post-Champions League final comments: I spoke heatedly|