"My players went to their physical and mental limits today, but it wasn't possible to get the result."

A powerful strike by Manchester City star Dzeko, the man-of-the-match, gave Bosnia an early lead before Miralem Pjanic added a second just before the hour to settle a relatively dull affair at Salvador's Arena Fonte Nova.

World Cup 2014: Bosnia-Herzogovina v Iran highlights

The game burst into life in the final minutes as Iran striker Reza Ghoochannejad netted his side's first goal of the tournament, but Bosnia replied immediately with an Avdija Vrsajevic goal.

The result confirmed both teams' exit as Argentina and Nigeria reached the knock-out stages by finishing first and second respectively in the table after the Argentinians' 3-2 win in Porto Alegre.

Bosnia, whose elimination had already been confirmed prior to the game, are left to rue what might have been after refereeing mistakes contributed to their 1-0 defeat to Nigeria in their previous match.

"This was was very important for us, we had to leave a good impression behind and be able to come home with heads up high," said Bosnia coach Safet Susic.

"But it's not a satificatory end.

"We could have done more and should have made that extra step.

"Had we had more luck, played slightly better football and had a few less refereeing errors we'd be in the next round."

Susic's side ended on a high to claim third and leave Iran bottom of the group with a single point from their draw with Nigeria.

Salvador has now seen 21 World Cup goals in four group games after the Netherlands destroyed Spain 5-1, Germany thumped Portugal 4-0 and France dominated Switzerland 5-2 with a last 16 match and quarter-final still to come in the stadium.

Dzeko had the best of the early chances when he fired over after a powerful run into the area, then headed straight at Iran goalkeeper Alireza Haghighi.

His much-threatened goal arrived on 23 minutes when Dzeko unleashed a fierce drive into the bottom right-hand corner past two defenders, which gave Haghighi no chance.

Iran almost hit back immediately as midfielder Masoud Shojaei clattered the crossbar.

But for all of Iran's attacking efforts, Bosnia's Stoke City goalkeeper Asmir Begovic was solid between the posts, especially from crosses.

With his side 1-0 down at the break, Queiroz brought on experienced forward Khosro Heydari to boost their attack.

But Bosnia grabbed the goal which killed off Iran's hopes from a defensive error.

A poorly timed pass out of the Iran defence was snapped up by Tino-Sven Susic who fed Pjanic and the Roma midfielder drilled his shot home on 59 minutes.

Charlton Athletic striker Ghoochannejad finally got Iran of the mark when he converted a cross eight minutes from time, although replays suggested he was offside.

Bosnia responded immediately to snuff out any hopes of a fight back as right-back Vrsajevic smashed home his shot after a charging run down the right flank.