With vital prize money pocketed and reputations enhanced by resolute displays, Iran should depart the World Cup with their heads held high but the departure of coach Carlos Queiroz leaves the future uncertain.

For the cash strapped federation, the $US8 million prize money for qualifying for Brazil is a welcome relief as the economic sanctions placed on the country have hindered their progress, with home friendly matches - a key source of income - proving tricky to organise.

Blow for Iran: Carlos Queiroz quit as coach after their World Cup exit. Credit:AFP

But the money comes too late to retain the much loved Queiroz, whose tactical nous was on full display as the Iranians held African champions Nigeria and came with seconds of repeating the trick against twice former champions Argentina.

If not for a brilliant stoppage time goal by Lionel Messi and two important saves by Sergio Romero, they may have recorded one of the great World Cup shock victories over the South Americans as Queiroz rang every last bit of talent out of his committed but limited squad.