Tournament favourites Brazil were knocked out of the World Cup on penalties as Croatia kept their nerve to edge through to the semi-finals.
Croatia, beaten finalists four years ago, scored with all four of their spot-kicks as Rodrygo - taking his team's first kick - was denied by the brilliant Dominik Livakovic and Marquinhos' crucial fourth effort struck the post.
As the ball hit the foot of the woodwork and bounced away, Croatia's team sprinted to celebrate with their goalkeeper, while the Brazil players hit the turf, knowing their dream of a sixth crown had come to an end.
After an engrossing 90 minutes, Tite's men thought they had won it in extra time when Neymar scored a thumping effort to equal Brazil's 'official' men's goalscoring record.
But substitute Bruno Petkovic had other ideas, stroking in a 116th-minute equaliser with Croatia's first shot on target in the match to take the game to the nerve-shredding shootout.
And it was the European side who emerged victorious once more, having done so by the same method against Japan in the last 16, to set up a semi-final meeting with the Netherlands or Argentina on Tuesday.
Croatia show endurance to stun favourites
This wasn't in the script.
Brazil were supposed to dance through to the last four in their quest for another star on their shirt but their hopes were ended in the cruellest fashion.
Neymar, who scored his 77th international goal to equal Pele's official mark, now shares a record recognised by Fifa but not the national team - as they also counted goals netted by their three-time World Cup winner in friendlies against club sides.
And the Paris St-Germain forward will not get the opportunity to surpass the legend at this tournament, as Brazil suffered woe against a European nation once again. Since beating Germany in the 2002 final, they have been knocked out of five successive World Cups by a team from Europe.
This was supposed to be Neymar's moment, standing up for his side when they needed him most with a clinical finish to complete a slick team move, but he was left in tears after the shootout.
He should have won it for them in normal time but neither he nor Lucas Paqueta could find a way past the inspired Livakovic, who made a total of 11 saves, the most by a goalkeeper at this tournament.
Though most were routine, Livakovic had to be in the right place at the right time to make the stop and he certainly was with Brazil's first penalty, diving the right way to push out Rodrygo's strike.
Croatia are a well-organised and stubborn outfit, but they did not managed a shot on target until four minutes from the end of extra time, as Petkovic's side-footer beat Alisson.
Zlatko Dalic's men displayed their mental fortitude and powers of endurance once more to go through - as eight of their past nine knockout matches at major tournaments have now ticked into extra time.
Once this one went to penalties, Nikola Vlasic, Lovro Majer, the evergreen Luka Modric and Mislav Orsic were all successful with their efforts to take Croatia through to their third World Cup semi-final.
Player of the match
ModricLuka Modric
Line-ups
Croatia
Formation 4-3-3
1Livakovic
22Juranovic6Lovren20Gvardiol19Sosa
10Modric11Brozovic8Kovacic
15Pasalic9Kramaric4Perisic
1Livakovic22Juranovic6Lovren20Gvardiol19SosaSubstituted forBudimirat 110'minutes10Modric11BrozovicBooked at 31minsSubstituted forOrsicat 114'minutes8KovacicSubstituted forMajerat 105'minutes15PasalicSubstituted forVlasicat 72'minutes9KramaricSubstituted forPetkovicat 72'minutesBooked at 117mins4PerisicSubstitutes
2Stanisic3Barisic5Erlic7Majer12Grbic13Vlasic14Livaja16Petkovic17Budimir18Orsic21Vida23Ivusic24Sutalo25Sucic26JakicBrazil
Formation 4-2-3-1
1Alisson
14Militão4Marquinhos3Thiago Silva2Danilo
7Lucas Paquetá5Casemiro
11Raphinha10Neymar20Vinícius Júnior
9Richarlison
1Alisson14MilitãoSubstituted forAlex Sandroat 105'minutes4MarquinhosBooked at 77mins3Thiago Silva2DaniloBooked at 25mins7Lucas PaquetáSubstituted forFredat 105'minutes5CasemiroBooked at 68mins11RaphinhaSubstituted forAntonyat 56'minutes10Neymar20Vinícius JúniorSubstituted forRodrygoat 64'minutes9RicharlisonSubstituted forPedroat 84'minutesSubstitutes
6Alex Sandro8Fred12Weverton13Alves da Silva15Fabinho17Bruno Guimarães19Antony21Rodrygo22Éverton Ribeiro23Ederson24Bremer25Pedro26MartinelliReferee:Michael OliverAttendance:43,893Live Text
Match ends, Croatia 1(4), Brazil 1(2).
Penalty Shootout ends, Croatia 1(4), Brazil 1(2).
Penalty missed! Still Croatia 1(4), Brazil 1(2). Marquinhos (Brazil) hits the left post with a right footed shot.
Goal! Croatia 1(4), Brazil 1(2). Mislav Orsic (Croatia) converts the penalty with a right footed shot to the bottom left corner.
Goal! Croatia 1(3), Brazil 1(2). Pedro (Brazil) converts the penalty with a right footed shot to the centre of the goal.
Goal! Croatia 1(3), Brazil 1(1). Luka Modric (Croatia) converts the penalty with a right footed shot to the bottom left corner.
Goal! Croatia 1(2), Brazil 1(1). Casemiro (Brazil) converts the penalty with a right footed shot to the bottom left corner.
Goal! Croatia 1(2), Brazil 1. Lovro Majer (Croatia) converts the penalty with a left footed shot to the centre of the goal.
Penalty saved! Rodrygo (Brazil) fails to capitalise on this great opportunity, right footed shot saved in the bottom right corner.
Goal! Croatia 1(1), Brazil 1. Nikola Vlasic (Croatia) converts the penalty with a right footed shot to the high centre of the goal.
Penalty Shootout begins Croatia 1, Brazil 1.
Second Half Extra Time ends, Croatia 1, Brazil 1.
Hand ball by Fred (Brazil).
Attempt saved. Casemiro (Brazil) left footed shot from the left side of the six yard box is saved in the centre of the goal.
Attempt blocked. Marquinhos (Brazil) header from the centre of the box is blocked.
Foul by Ivan Perisic (Croatia).
Antony (Brazil) wins a free kick on the right wing.
Dejan Lovren (Croatia) wins a free kick in the defensive half.
Attempt missed. Lovro Majer (Croatia) left footed shot from outside the box misses to the left. Assisted by Josip Juranovic.
Get the latest results and goal notifications for any team at the Fifa World Cup by downloading the BBC Sport app: Appleexternal-link - Androidexternal-link - Amazonexternal-link
Get your daily dose of Fifa World Cup reaction, debate & analysis with World Cup Daily on BBC Sounds