Philippe Coutinho and Neymar both scored in stoppage time to snatch victory for Brazil after the Paris Saint-Germain forward had been denied a penalty by VAR in a 2-0 World Cup win over Costa Rica.
Desperate for a win in St Petersburg after being held to a 1-1 draw by Switzerland in their opening fixture, Brazil looked like missing out on the three points when the decision to award Neymar a spot-kick was overturned in the 79th minute.
The former Barcelona star went down softly under the challenge of Giancarlo Gonzalez, with referee Bjorn Kuipers initially pointing to the spot.
However, VAR intervention led to a reversal of the decision, as replays showed minimal contact between Gonzalez and Neymar, who had fallen backwards as if pulled down.
The incident came late in a match Brazil dominated but in which for long spells they struggled to break down a determined Costa Rica defence.
However, with the clock having ticked past 90 minutes, Coutinho and Neymar stepped forward to break Costa Rican hearts and spare Brazilian blushes, sending their side top of Group E ahead of the clash between Serbia and Switzerland.