It took the Golden Eaglets the last five minutes of the encounter at the FIFA U-17 World Cup tournament ongoing in Brazil to tame Ecuador in their second group match.
Nigeria had gone ahead early in the match to score.
A fifth minute goal by Ibrahim Said put Nigeria ahead.
But in the 10th minute, the Ecuadorians levelled scores with an own goal by Daniel Jinadu.
Ecuador’s Johan Mina converted a penalty kick in the 56th minute after Charles Etim committed an infraction.
It looked like the match was going to end in favour of Ecuador until the last five minutes when Said scored in the 85th and 89th minutes.
The Golden Eaglets have had a perfect beginning to the competition as they had defeated Hungary 4-2 in their first group match.