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 B. Koné 8'
for J. Lingani 68'
for Mohamed Koffi 78'
|Barcelona announce club-record revenue|
|Bony could be sold for right price, says Jenkins|
|Confidence key for Newcastle, says Taylor|
|Saivet out for four weeks with knee injury|
|Genk part company with Ferrera after just one game of season|
|Gold clarifies Twitter gaffe|
|Vidic adapting to different style at Inter|
|Toulouse bring in Matheus|
|Butragueno backs Rodriguez to cope with pressure|
|Benteke aiming to come back stronger|
|Valdez joins Frankfurt|
|Jovetic ready to shine|
|Simeone hails Griezmann qualities|
|Monk unsure over De Guzman future|
|Benitez: Michu will take time to adjust|
|Diaby confident of staying fit|
|Shaw not fit enough, says Van Gaal|
|MLS Preview: RSL look for attacking spark|
|Monk slaps ´astronomical´ price on Bony´s head|
|Australian clubs looking at Ronaldinho|
|Sinclair enjoying ´one of the best pre-seasons´|
|Spiranovic surgery a success|
|Seattle Sounders 0 Los Angeles Galaxy 3: First-half blitz fires Californians to victory|
|Lemina thrilled with Bielsa effect|
|Bayern´s Green chomping at the bit|
|Palace complete US tour with easy win|
|Simeone: Atleti´s La Liga triumph was no fluke|
|Carragher: Liverpool didn´t want me|
|Sturridge: ´I´ll step up´|
|Van Gaal: Formation gives United flexibility|
|Mathieu insists age is no barrier|
|Martinez the deal sealer, says Besic|
|Coaches embrace blockbuster Serie A start|
|Ronaldinho to leave Atletico Mineiro|
|Lorient capture Ayew|
|Celtic loan Berget, sell Watt|
|Pires signs up for Indian Super League|
|Allegri set for early San Siro reunion in maiden Juve campaign|
|Bakayoko makes Monaco move|
|Bakayoko makes Monaco move|
|Lens granted Ligue 1 place|
|UEFA Champions League Preview: Red-hot Salzburg face Qarabag|
|Parma bring in Cassani from Fiorentina|
|De Vrij set for Lazio|
|BREAKING NEWS: Everton complete Besic signing|
|Kongolo pens Feyenoord extension|
|Redknapp confirms Granero exit|
|Advocaat confirmed as Serbia coach|
|CSL Preview: Henan aim to escape drop zone, Liaoning host Guangzhou RandF|
|Arribas makes Sevilla switch|
|Chambers joins Arsenal|
|Ospina buoyed by Arsenal recruitment|
|Liverpool´s loss is our gain, says Redknapp on Remy|
|Ferdinand: I would still be at United with Giggs in charge|
|Pepe targets Super Cup glory|
|Martinez prioritising striker signing|
|Perez not looking to leave Benfica|
|Klopp itching to work with full Dortmund squad|
|Mourinho: It feels like Drogba never left|
|FIFA asks for FIGC review into alleged racist remark|
|Hull to review Maguire deal|
|Wenger prepared to gamble on Chambers|
|Atletico agree Griezmann deal|
|Irvine planning further striker addition|
|Campbell: Black professionals scared to talk about racism|
|Mata backs Herrera to star in Premier League|
|Injured Rafael returning to Manchester|
|Schmidt demands more from Leverkusen|
|Copa Libertadores Preview: Defensor Sporting banking on home record|
|Remy´s Liverpool move off, confirms Rodgers|
|Inzaghi demands nastiness from Milan|
|MLS Review: Timbers triumph in Montreal, Dallas thwart Vancouver|
|Jovetic ready to lead City line - Pellegrini|
|Lewandowski impresses Ribery, Alaba|
|Colombian Primera A Review: Three clubs remain perfect, Atletico Nacional get off the mark|
|Rodgers: ´We can score goals´ without Suarez|
|Chilean Primera Division Review: Canales brace powers Universidad Chile|
|Atletico Madrid need penalties to edge past Earthquakes|
|Liga MX Review: Monterrey, America stay perfect|
|Paraguayan Primera Division Review: Capiata set pace|
|Brazilian Serie A Review: Cruzeiro win again, Kaka scores|
|Sterling goal sees Liverpool past Olympiacos|
|Peruvian Primera Division Review: Los Caimanes notch maiden win, Inti Gas claim top spot|
|CAF Champions League Review: Zamalek held, Vita Club leave it late|
|Jovetic at the double as Manchester City thrash Milan|
|Monk thrilled by Sigurdsson contribution|
|Lovren signs for Liverpool|
|Mourinho pleased with Olimpija test|
|Vertonghen eager to remain at Spurs|
|Sigurdsson marks Swansea return with a brace|
|Lewandowski, Rode help Bayern retain Telekom Cup|
|Immobile scores and suffers injury in Dortmund win|
|Costa scores on Chelsea debut|
|CAF Confederation Cup Review: Leopards de Dolisie 1 Real Bamako 2|
|Thai Premier League Review: Buriram pull clear, Police edge away from danger|
|Falcao nears Monaco return|
|CSL Review: Harbin Yiteng produce another upset, Evergrande stretch lead|
|Britton and Emnes to miss season-opener|
|Taylor-Fletcher strike sinks Everton|
|J.League Review: Chasing pack close on Urawa Reds, Tokushima Vortis secure rare win|
|Ancelotti expects fresh Bale to be even better|
|Simeone keen on Griezmann|
|Mazzarri refuses to set Inter targets|
|Lazio director targeted by fans|
|Dyche rules out Deeney move|
|Rummenigge: Bayern will never sack Guardiola|
|BREAKING NEWS: Arsenal to bring in Ospina|
|Pochettino quiet on Schneiderlin link|
|Vidic settling into Inter life|
|Van Gaal hints at Zaha United future|
|Di Maria will report for training - Ancelotti|
|Wilshere vows to answer critics|
|Rodgers expecting titles|
|Deila demands Celtic cutting edge|
|Rodgers: We won´t rush Lallana|
|Wenger: We have to be better against top-level teams|
|FIGC presidential candidate uses racist slur|
|MLS Review: Columbus claim second straight win, Toronto falter|
|Villa battle past Dynamo in Houston|
|United more efficient, says Garcia|
|Pedestrian Tottenham edge past Chicago Fire|
|Van Gaal bemoans display|
|CS Sfaxien 1 ES Tunis 0: Troussier era opens with a win|
|Icardi stars from the spot as Inter overcome Real Madrid|
|Arsenal upstaged by Red Bulls|
|Pre-Season Friendly Review: Rooney stars for United, Bayern reach Telekom final|
|In-form Rooney inspires Manchester United win|