Nigeria won their first World Cup game since 1998 to knock Bosnia-Herzegovina out of their debut appearance at the tournament in the group stage.
Bosnia thought they had edged in front in the 21st minute when Miralem Pjanic found Edin Dzeko, and the Manchester City striker made no mistake in finding the back of the net. However, referee Peter O'Leary ruled the goal out for offside, although TV replays suggest the decision was harsh.
The World Cup debutants' luck worsened when they fell behind just before the half-hour mark, with Emmanuel Emenike producing a burst of speed down the right flank to beat Emir Spahic before squaring the ball for Peter Odemwingie to score for the Super Eagles.
They almost doubled their lead in the 39th minute when Ahmed Musa skilfully worked himself into space before he produced a low strike that needed to be dealt with by Asmir Begovic.
Bosnia squandered a great opportunity to level the game on the stroke of half time when Pjanic again linked up with Dzeko, but the City frontman leaned back at the crucial moment and saw his shot fly high into the stands.
The Golden Lilies tried to find a response after the break, but were grateful to keeper Begovic for keeping them in the game after he produced two saves to keep out Michel Babatunde and the ever-threatening Emenike.
The Europeans then saw a great goalscoring chance come and go as Vedad Ibisevic rose well to meet a corner, but couldn't direct his effort on target.
Pjanic then tried to seize the initiative, but his shot was dealt with comfortably by Vincent Enyeama.
As their opponents committed men forward in search of an equaliser. Emenike almost made sure of victory late on when he beat two players before sending his low drive inches wide of the post.
In the final minute of stoppage time Dzeko saw his effort turned onto the post by Enyeama and it proved to be their final opportunity as they exit the World Cup at the group stage.
Nigeria will reach the last 16 if they can avoid defeat against Argentina in their final group game.