Algeria celebrate winning a penalty shootout against Ivory Coast in the Africa Cup of Nations quarter-finals ©Getty Images

Algeria set up an Africa Cup of Nations semi-final duel with Nigeria after edging past Ivory Coast in a penalty shootout.

The teams had been locked at 1-1 following extra-time but Wilfried Bony and Serey Die failed to convert in the shootout, sending Algeria through.

It was a dramatic end to a rollercoaster night at Suez Stadium in Suez.

Ivory Coast’s Max Gradel had early on seen an effort pushed on to the post by keeper Rais M’Bolhi, before Sofiane Feghouli put Algeria ahead midway through the first half with a side-footed finish.

Baghdad Bounedjah spurned the chance to double the lead when he hit the bar from the spot after he had been fouled by stopper Sylvain Gbohouo.

Jonathan Kodjia equalised with a low effort just after the hour but there were no further goals, before Algeria prevailed 4-3 on penalties.

The Desert Foxes will face Nigeria at Cairo International Stadium on Sunday.

Youssef Msakni scores Tunisia's second goal against Madagascar ©Getty Images
Youssef Msakni scores Tunisia's second goal against Madagascar ©Getty Images

In the other last-eight clash, tournament debutants Madagascar saw their hopes of a fairytale final ended following a 3-0 loss to Tunisia, who reached their first continental semi-final in 15 years.

Ferjan Sassi put the Eagles of Carthage in front seven minutes after the break at Al Salam Stadium in Cairo when his effort deflected into the net via Thomas Fontaine.

Youssef Msakni quickly added a second after keeper Melvin Adrien parried Wahbi Khazri’s shot.

Madagascar, who had claimed famous victories against Nigeria and DR Congo earlier in the tournament, tried vainly to force their way back into the game.

But Naim Sliti made sure of victory in the third minute of stoppage time when he tucked away Khazri’s square pass.

Senegal will be Tunisia's next opponents, the semi-final clash set to take place at 30 June Stadium in Cairo on Sunday.