Edin Dzeko's long-range strike gave Bosnia a 1-0 lead over Iran at halftime in Wednesday's World Cup Group F match.
Dzeko struck in the 23rd minute with a low shot from 20 yards (meters), deflecting in off the post.
A minute later, Masoud Shojaei rattled Bosnia-Herzegovina's crossbar but couldn't find the equalizer.
Bosnia controlled play for most of the half, while a defense-oriented Iran lineup relied on rare counterattacks.
Iran needed a win to have any chance of advancing to the knockout stages. The Bosnians were already out of contention following consecutive losses to Argentina and Nigeria.