Nigeria advance in second place, and this was a wake-up call for them.
The opening goal came almost from nothing, John Ogu’s 12th-minute pass back to defender Leon Balogun intercepted with ease.
Balogun called for the ball but hesitated as it approached and as he dithered, he also lost his footing. Nomenjanahary had the time to nip in, steal the ball and show composure to round Nigeria goalkeeper Ikechukwu Ezenwa and tap into an empty net.
Samuel Kalu curled an effort wide as Nigeria sought a quick response but even though they controlled possession, they struggled to create clear-cut opportunities. Kalu’s appeal for a penalty was turned down despite it looking like he was clipped as he tried to round Madagascar goalkeeper Adrien Melvin.
Both sides are advancing into the next stage which is the round-of-16 stage.