Iran finished bottom of Group F as Bosnia-Herzegovina ran out 3-1 winners in their final game, in Salvador.
Edin Dzeko and Miralem Pjanic gave Safet Susic's side a comfortable-looking lead before Reza Ghoochannejad scored the Iranians' first goal of the World Cup late on.
However almost immediately, Avdija Vrsajevic went up the other end to end Iran's hopes of qualification.
See how the action unfolded below.
Good afternoon and welcome to Sports Mole's live commentary of the World Cup clash between Iran and Bosnia-Herzegovina.
Something we should probably mention at the top of the hour is this unique scenario...Should Nigeria lose to Argentina 1-0, and Iran overcome Bosnia by the same margin, then we will have the unprecedented situation of having Group F's runners-up decided by a flip of a coin, or a lottery draw at the Maracana.
Goals scored and conceded as well as head-to-head would all be level, leaving FIFA with the task of deciding who goes through in an off the field decision for the first time the World Cup's 84-year history.
Team news is just reaching us here...
Bosnia: Begovic; Vrsajevic, Spahic, Kolasinac, Besic; Pjanic, Ibisevic, Susic, Sunjic; Dzeko, Hadzic
Iran: Haghighi; Haji Safi, Hosseini, Sadeghi, Nekounam; Shojaei, Timotian, Montarezi, Dejagah, Pooladi; Ghoochannejad
So the big news for Bosnia is Edin Dzeko and Miralem Pjanic are given a chance to sign off on a high note, while Iran have Reza Ghoochannejhad and Ashkan Dejagah in their starting lineup. They are yet to score so far of course, but they will need to change that to have any chance of progression.
The other game in Group F this afternoon is Argentina vs. Nigeria, and we'll keep you updated with events from that game as we go. It could be a very interesting afternoon of World Cup action. Dont forget to catch a glimpse at live daily World Cup blog also. You can view it by clicking here.
So what can we expect from today's game based on what we've already seen? Well Iran were unlucky against Argentina. They perhaps created the best chances, but were undone by a wonder-goal from Lionel Messi in the dying seconds. However, they were slightly more rigid against Nigeria, barely getting out of their own half...
Bosnia for their part caused one or two problems against Argentina in their first game, but were also undone by a moment of genius from Messi. They were then beaten by Nigeria in their last game to end their hopes of qualification.
Iran are unbeaten in their last five meetings against Bosnia, having won four games between 2001 and 2009.
There's a start for Tino-Sven Susic for Bosnia this afternoon, and he is the nephew of coach Safet Susic. The boss has opted for five changes this afternoon as he looks to at least end his side's campaign on a positive note. Iran are unchanged from the side that were beaten by Lionel Messi's superb late winner on Saturday.
Iran boss Carlos Queiroz has claimed that his side aren't even thinking about the prospect of qualifying...
"Well it's just our crucial game on our way to our expectations," he told reporters. "Of course as everybody knows we still have an open gate to try for qualification for the second round but this is not the way we are thinking.
"We are thinking to play one more game and try to do our best against a great team with very, very good players. Unfortunately for them they are out of the race but anyway we know it will be a tremendous game for us tomorrow."
"The most important thing is not to lose the sense of reality and understand where we are, who we are and against who we are playing. We are playing against a team full of players with international experience."
Meanwhile, Ashkan Dejagah is targeting goals this afternoon. The Iranians need to score to have any chance of qualifying - a fact the Fulham midfielder is more than aware of...
He told FIFA.com: "Hopefully this third match will bring another step up. We'll definitely be going for goals and we still have a chance to go through, I'm sure of that.
"We don't have players like Messi, (Sergio) Aguero and (Angel) di Maria, so we need to focus on making ourselves as well-organised as possible. The shape of the team, making sure we're tough to get through defensively, is something that has been very important for the coach in the build-up to this tournament."
Around 10,000 Iran fans are reportedly in attendance at the Arena Fonte Nova in Salvador, so they won't be without support this afternoon. The two teams are in the tunnel, so we're a few minutes away from kick off now.
The two teams are just running through the formalities of the national anthems and then pre-match handshakes, so we're not far away now...
KICK OFF: And we're up and running...
The lottery of the draw for the runners-up place by the way, will take place 90 minutes after today's games, should it be needed, of course.
An early penalty shout for Iran as Haji Safi goes down in the area, but the Spanish referee tells him to get up in no uncertain terms. It wasn't a penalty, good decision from the official.
CHANCE! really good save from Haghighi who tips over Edin Dzeko's effort. The Manchester City striker held off his man and turned before getting the shot off inside the box. Decent chance for Bosnia. Good save.
UPDATE: My word! It's already 1-1 between Nigeria and Argentina. Lionel Messi netted for his side, while Ahmed evened it up seconds later.
Iran have started in similar fashion to the Nigeria game, with bodies behind the ball. They seem content to wait for their chance. Dzeko gets a powerful header in but it was held by the goalkeeper. A lively start from the Manchester City striker.
Miralem Pjanic sends in a dangerous-looking free kick and the keeper is hesistant. Iran eventually clear it behind for a corner. Pjanic then centres another good delivery from the dead ball and Bosnia win a free kick on the edge of the box, wide left...
Third time unlucky for Pjanic, as he hammers the free kick at the wall.
Good opening for Iran as Dejagah lays it down the line to Sadeghi who hammers in a low cross. It's cleared but only straight back to him but he can't control it and goes out for a goal kick. A touch more zip to Iran's attacking play now though.
Shojaei almost squeezes in Dejagah with a threaded through ball on the counter, but it was well read by Susic who stepped in and intercepted it. The score of the Nigeria game may have been translated to Iran as they have stepped up their attacking efforts the last five minutes or so.
It opened up for Dejagah to try and lay in a teammate who was bursting forward from midfield for a split second then but Bosnia crowded the Fulham man out quickly with four men closing the space and pressing him really well.
GOAL! Bosnia 1-0 Iran (Edin Dzeko)
Great goal from the striker. He picks it up from Pjanic and drives at the defence before hitting a low left-footed effort into the bottom corner. Wonderful from him.
CHANCE! Shojaei hits the underside of the crossbar as Iran almost give us an instant response. Replays showed it was clearly not over the line, but what an effort from just inside the box wide right. Game has perked up now!
Wonderful defending from Bosnia as they moved to cut out another through ball as Susic and Besic collide off the ball. Both players are down and the Europeans were down to nine men during that Iran attack.
Iran have responded well to going behind, but they need to turn that into two goals here. Dejagah stands over a free kick before smashing it into the wall. It eventually falls to Poolaidi, but Begovic makes an excellent stop inside the six-yard box. However, replays showed there was three offside and it had been brought bacl.
Dejagah flights a decent-looking cross, but Begovic moves off his line and gathers dominantly. Good goalkeeping from the Stoke City stopper.
Shojaei has looked lively down the right side for the Iranians, him and Dejagah have looked to create as much as they can. They could do with getting those two on the ball more often here.
There's a player down for Bosnia. It's their captain Spahic who went down after what looked like a knee into his back. It did appear accidental though. That could be the end of his game, he's been stretchered off...
Iran look to have gone a bit more direct with two up top. Dejagah has gone up front alongside Ghoochannejad. We will see what difference that will make...
Decent approach play from Bosnia, as they attempt some slick one-twos. It comes to Dzeko 35 yards out and his lofted cross is easily defended. Game has gone a bit quiet the last five minutes or so.
Begovic again marches off his line to gather a long, deep free kick, but he almost drops it, before gathering at the second attempt. Three minutes of time added on.
UPDATE: Lionel Messi has scored his second goal of the game from a free kick and Argentina lead Nigeria 2-1.
HALF TIME: Bosnia 1-0 Iran
Well, not a whole lot to report on that first half. Edin Dzeko's goal was pure class and Shojaei struck the crossbar with a great effort, but Iran have sturggled to create anything in the final third.
As it stands, Nigeria are going through, despite their scoreline against a Lionel Messi-inspired Argentina.
So Iran are going to have really give it their all this second half. It should make for an exciting second 45, but the way they have gone about their business so far, I'm not holding my breath. We shall see...
Shojaei and Dejagah were Iran's best players in that first but Reza Ghoochannejad has been practically invisible. Iran certainly need more from the Charlton striker. Both teams are emerging out of the tunnel as I type, so we're nearly ready for the second half.
Heydari has come on for Shojaei for the second half.
KICK OFF And here we go for the second half...
Bosnia happy enough to hold on to possession in their defence early on. No pressure on the ball from Iran though, which is surprising, given that they need two goals...
UPDATE: It's now 2-2 between Nigeria and Argentina. Bad news for Iran...
First touch for Heydari and it is a deep cross which floats harmlessly into Begovic's gloves. Iran look like a team who have accepted their fate here. They have lacked any real quality in the final third.
UPDATE: It's now 3-2 to Argentina, that looks like some game!
The onus back on Iran then, amazingly, despite not scoring, they still have a chance to go through to the last 16 with just over half an hour to go...
Chance of sorts for Iran as Dejagah gathers a long ball before sliding Heydari in wide right and the sub clips a decent looking ball in but there's no one there to attack it...
Susic almost manages to squeeze in a good cross to Dzeko, but it was ruled to have gone out. Nice build-up from Bosnia though. The tempo starting to raise a touch now.
GOAL! Bosnia 2-0 Iran (Miralem Pjanic)
Quality goal as Dzeko feeds Susic who threads it to Pjanic on the edge of the box, and the Roma star takes one touch before guiding it into the corner with his in-step. It's looking grave for Iran now.
Dejagah really has worked hard out there today. He has constantly tried to start attacks but all too often his surrounding teammates have been unable to match him.
CHANCE! Well a frantic few seconds and Bosnia should have had the ball in the net. Eventually comes out wide to Susic who delivers a low cross but Dzeko decides to take it off the toe off Pjanic who was well-placed. Then Kolasinac miscues his cross somewhat and it hits the base of the post.
SUB: Dejagah off for Ansari Fard, and the Fulham midfielder looks dejected as he ends his World Cup.
Great play from Pjanic as he effortlessly rolls away from two challenges with a turn in midfield, but his clipped ball finds Edin Dzeko who is in an offside position. That was nice play from the Roma man.
It looks as though Bosnia will extend their lead before Iran score at this tournament, Kolasnic, Dzeko and Pjanic all having spells of possession on edge of their opponents' area. Aalthough it eventually comes to nothing.
Pjanic's pass finds Susic on the edge of the box who hammers in an effort but it cannons off a teammate and bounces up into Haghighi's gloves. The game being played an snail's pace now.
SUB: Salihovic is on for Susic.
CHANCE! Ghoochannejad get s ashot blocked inside the box, but he grabs the rebound and hits a left-footed effort across goal which is well-saved by Begovic. Iran cannot make anything of the corners
GOAL! Bosnia 2-1 Iran (Reza Ghoochannejad)
GOAL! Bosnia 3-1 Iran (Vrsajevic)
Well what a crazy couple of minutes, first Ghoochannejad was on hand to tap home inside the six-yard box before Bosnia went straight up the other end and Vrsajevic smashes it in off the far post after bursting forward from the right.
Montazeri flights in a good cross and Ansari Fard tries to gather it in before going down inside the box. It looked a bit of a dive in all honesty and he is booked for the incident.
Bosnia have been deserved winners here. They have looked more dangerous with their attacks and have been ruthless when needed. Iran's old failings come to the surface once more. Not enough quality in the final third. They go out botton of the group. Three minutes left.
FULL TIME: Bosnia 3-1 Iran. Both teams exit the World Cup. Nigeria and Argentina qualify from Group F
Well there we have it. Iran had a chance to sneak through, but eventually prop up the group. Bosnia were the better team and deserved the win. It's finished Argentina 3-2 Nigeria in the group's other game.
Well that's all from me, Group F is done and dusted, Argentina will face Switzerland or perhaps Ecuador, while Nigeria will meet France. I hope you have enjoyed the commentary, until next time, bye for now.