Bosnia-Herzegovina will not progress beyond the group stage of the 2014 World Cup after they were beaten 1-0 by Nigeria in Cuiaba.
Peter Odemwingie's first-half goal was the difference between the sides, as Nigeria reached four points in Group F ahead of Wednesday's meeting with Argentina, who have already qualified for the knockout stages.
After a positive display in a narrow loss to Argentina in their first-ever fixture at this level, Bosnia would have been hopeful of picking up a maiden World Cup success over a Nigeria side who laboured to a draw in their opener with Iran.
The three points move Nigeria to second in Group F, with a draw in their final game against already-qualified Argentina enough to see them through.
Bosnia started on the back foot and Emmanuel Emenike was gifted the ball by a poor Emir Spahic pass, with Haris Medunjanin hauling down the forward and Odemwingie striking the resulting free-kick only inches wide.
Bosnia-Herzegovina had a goal ruled out for offside in the first half, despite replays showing Edin Dzeko, who finished beyond goalkeeper Vincent Enyeama smartly, in an onside position when played through.
The controversy continued when Nigeria took the lead on 29 minutes. Emenike sprinted down the right channel and Bosnia-Herzegovina thought he had fouled Emir Spahic, but the referee allowed play to go on and Odemwingie slotted home from the assist.
Bosnia-Herzegovina struggled to mount any pressure on Nigeria's goal in the second half, and instead Emmanuel Emenike almost doubled his nation's lead only to be denied by goalkeeper Asmir Begovic, before Edin Dzeko saw a late shot strike the woodwork after being kicked away by Enyeama.
Muhamed Besic bent a shot over Vincent Enyeama's crossbar as the fast pace continued for the early stages, with Ahmed Musa then unable to control a perfect pass from Emenike.
As Nigeria began to take control of the game, John Obi Mikel was the next man to come close. But the Chelsea midfielder dragged a low shot wide, with Onazi forcing a save from Asmir Begovic from a similar effort soon after.
Zvjezdan Misimovic could not test Enyeama when well-placed on the edge of the Nigeria box as Bosnia looked to enjoy their own spell of sustained pressure.
That new-found pressure should have led to an opening goal as Dzeko appeared to have scored on 20 minutes but the striker was flagged offside as he rifled home a weighted through ball, with replays showing the decision to be a poor one as he was well onside.
Hajrovic finally worked Enyeama as he cut inside and let off a decent effort, with Dzeko set free again moments later -- this time the flag remained down but the Manchester City striker's shot was not strong enough to beat the Nigerian goalkeeper on the second occasion.
With Bosnia starting to grow into the game, Nigeria struck a blow with the opening goal as Emenike was too strong for captain Spahic and his low cross was tucked away by Odemwingie just before the half-hour mark.
The goal was not without controversy, however as the Bosnia bench erupted following the decision not to award Spahic a free-kick as Emenike did seem to inadvertently clip the skipper's heels.
Musa stung the palms of Begovic later in the first half as Nigeria looked to build on their lead but Bosnia still held a threat as Medunjanin's long-range shot flew wide before Dzeko thrashed an effort past the post in stoppage time.
The second half did not start with the same vigour as the first, with Nigeria a little less motivated on offense, yet doing a better job at containing Bosnia in the process.
Michael Babatunde worked Begovic as Nigeria did push forward when they had the opportunity, with Safet Susic introducing Vedad Ibisevic from the Bosnia bench to give his side more attacking options.
Begovic was forced to keep out another Babatunde strike before the Stoke City goalkeeper made himself big to block Emenike's close-range chance and was kept busy as the same player drilled in a near-post effort on 65 minutes.
Ibisevic, who scored Bosnia's first-ever World Cup goal in their opening-match defeat, should have levelled the game with 15 minutes remaining but could only head Misimovic's corner over despite little Nigerian pressure.
Nigeria began to sit back as they looked to close out the win and Miralem Pjanic sent Enyeama sprawling as the impressive midfielder looked to level the game.
The Super Eagles had not been shy to shoot on site throughout the game and Onazi once again called Begovic into action before Emenike's own attempt slid wide.
There was still time for two chances to fall to Dzeko to salvage a point for his side. The first was a downward header that was easily saved but his second shot was diverted onto the post by Enyeama's boot.
Bosnia drop out, while Nigeria take a big step towards progressing to the latter stages.