Bosnia and Herzegovina marked the final match of their first-ever FIFA World Cup appearance with an impressive 3-1 victory over Iran, who notched their only goal of the tournament but were eliminated from Group F.