Madagascar beat DRC to reach AFCON last eight

Madagascar have reached the Africa Cup of Nations quarterfinals.

Madagascar kept up their fairytale run at the Africa Cup of Nations by reaching the quarterfinals with a 4-2 shootout win over the Democratic Republic of Congo after a 2-2 extra-time stalemate in their last-16 tie on Sunday.

The tournament debutants had upset Nigeria to finish top of their group and added another major win by edging the twice champions after Marcel Tisserand and Yannick Bolasie missed in the shootout to set up a meeting with either Tunisia or Ghana.

Sunday's result kept up the tournament's series of shocks which have already seen tiny Benin upstage Morocco and hosts Egypt eliminated by South Africa.

Ibrahim Amada opened the scoring for Madagascar in the ninth minute but Cedric Bakambu equalised in the 21st.

- Africa Cup of Nations: All you need to know

- Full Africa Cup of Nations fixtures schedule

Madagascar restored their lead in the 77th minute through veteran captain Faneva Ima Andriatsima but Chancel Mbemba made it 2-2 in the final seconds to take the game into extra time.

The opening goal came after Lalaina Nomenjanahary cut inside from the wing and wanted to shoot himself but Amada was better placed and unleashed a swerving left-footed cracker that flew into the top corner for a dream start.

However, the Malagasy lead lasted only 12 minutes as Bakambu equalised in simple fashion as he ghosted between two defenders to get his head to a searching ball from fullback Glody Ngonda.

Madagascar should have scored again soon after the break when Jerome Mombris's solo run ended with a shot that was only parried by Congolese keeper Ley Matampi but the follow up from less than a metre was blasted wide by Carolus Andriamahitsinoro.

The Indian Ocean islanders looked on course for the last eight though when 35-year-old skipper Andriatsima scored with a diving header from an inch-perfect cross by American-based defender Romain Metanire after a mazy run down the flank.

But Mbemba rose highest to power home a header from a corner on the stroke of full-time to keep DR Congo in the contest.

Nine minutes into extra time the midfield colossus might have had a second from a similar situation but was denied by a one-handed stop from Madagascar keeper Melvin Adrien.

The game went to penalties and DR Congo's Tisserand and substitute Bolasie both missed while Madagascar converted all their spot kicks with aplomb to prolong their dream debut.

Some 300 Malagasy supporters had arrived before the game on a chartered plane, along with the country's president Andry Rajoelina, and they created a lively atmosphere despite vast swathes of empty seats at the stadium.