The Liverpool defender came on in the 69 minute with his country leading 1-0 in Rostov thanks to a strike from Milan Badelj. The Balkan side shone in victories over Nigeria and Argentina to qualify for the last 16 and they will finish first if they avoid losing to Iceland.
On the stroke of halftime, Aron Gunnarsson fired an angled shot that was bound for the top corner until Lovre Kalinic tipped it away. A Nigeria draw or loss opens the door for Iceland, which must win and win any potential tiebreaker with Nigeria (in the event of a draw in the other Group D match) or Argentina (in the event of a win over Nigeria). Gylfi Sigurdsson levelled with a penalty but Ivan Perisic grabbed a last-gasp victor.
For all of Croatia's dominance, Iceland did pose a real threat on the counter attack but they were let down by their decision-making in the final third of the pitch.
The Iceland defender Sverrir Ingason almost scored twice just moments later, heading just over and then again off the crossbar.
Wimbledon Favorite Kvitova Cruises Into Birmingham Final, Rybarikova Next
For me, Petra is one of the best players when she is playing really on fire, so we will see how it's going to be her day tomorrow. In Mallorca, Garcia went down 6-3, 6-3 to Sofia Kenin, with Lucie Safarova, another seed, also knocked out by Tatjana Maria .
They were rewarded in the 76th minute when second-half substitute Dejan Lovren handled the ball and Sigurdsson rifled the resulting penalty into the roof of the net.
In the second half Croatia stepped up a level and Badelj struck the bar with a deflection. Croatia have now also won three straight group games at a World Cup for the first time in the country's history.
Hallgrimsson cut his teeth in global management as assistant to Swede Lars Lagerback, who steered Iceland to the Euro 2016 finals, where they beat England in the last 16 but fell to host nation France at the quarter-final stage.
Buoyed by the cacophonic "Viking Thunder Clap" from the crowd, Iceland poured forward in search of the goal which would see them through into the knockout stages but it was Croatia who would laugh last, as Ivan Perisic stole in to break Icelandic hearts as the game moved into stoppage time. Iceland's maiden World Cup campaign, meanwhile, has ended with a first-round departure.