PORTO ALEGRE, Brazil — Lionel Messi scored twice to inspire Argentina to a thrilling 3-2 win over Nigeria Wednesday which clinched top spot in World Cup Group F and sent home an army of Sky Blue supporters with smiles on their faces. The few Nigerian fans in the crowd also left happy because their team advanced to the knockout phase thanks to Bosnia's 3-1 win over Iran. The group finished with Argentina on nine points, Nigeria on four, Bosnia on three and Iran on one. Nigeria entered the contest as the only team which had yet to concede a goal. Boasting one of the most intimidating attacking formations in the business with Messi, Sergio Aguero, Gonzalo Higuain, Argentina had managed just three goals in two matches. But the “Fab Four” were on song against Nigeria, with a dominating attacking display led by Messi, who struck twice in the opening half and looked dangerous throughout. Messi, who celebrated his 27th birthday Tuesday, lashed in a rebound to give his side the lead after three minutes and scored again in first-half stoppage-time when he curled a sensational 20-meter free kick into the corner of the net. Argentina's brilliance on the attack was offset by shaky defense as Nigeria's Ahmed Musa twice canceled out Messi goals with neat finishes in the fourth and 47th minutes. The Argentine crowd was stunned when Musa scored just after halftime but were quickly back on their feet celebrating three minutes later when a charging Marcos Rojo stabbed home a bouncing ball from close range. Bosnia ends Iran hopes In Salvador, Bosnia record its first World Cup win and denied the West Asians any chance of reaching the knockout stage. Bosnia opted to ditch a cautious 4-5-1 setup in favor of the attack-minded 4-4-2 that brought them 30 goals in qualifying, restoring Vedad Ibisevic up front alongside Dzeko. The result was a more controlled performance, the Bosnians bossing most of the first half and taking the lead when Dzeko dropped deep into space to collect a pass before travelling to fire in low off the post from just outside the box. In a scrappier second half, Bosnia scored a second when Dzeko picked up a loose ball that allowed Tino Sven Susic, nephew of Bosnia coach Safet Susic, to slide in Pjanic for a tidy finish. Despite the roars of support the dogged defensive qualities that have won Iran plaudits in Brazil suddenly looked a little ragged and it struggled to reproduce the swift attacks that had worried twice champion Argentina in their last game. Ghoochannejhad provided a moment of cheer when he ensured Iran would avoid being the only team not to score in Brazil, scoring from close range after Bosnia failed to clear their lines quickly enough. The cheers were short lived though as right back Vrsajevic's marauding run saw him played in to thunder a third home off the far post, earning Bosnia their first win over Iran in six attempts. — Agencies