Injury time goals from Philippe Coutinho and Neymar spared Brazil's blushes against Costa Rica, who kept the favorites at bay for so long. It was a frustrating afternoon for Neymar who was denied a penalty by VAR.
Brazil were frustrated for over 90 minutes by a stubborn, well-organized Costa Rica team in Saint Petersburg.
In a first half in which Brazil were limited to Neymar free kicks and long-range Marcelo efforts, it was in fact the underdogs who had the best chance. Cristian Gamboa got to the byline and cut back for Celso Borges but the midfielder dragged his shot wide.
Former Bayern Munich winger Douglas Costa replaced the ineffective Willian at halftime and Brazil came flying out of the blocks in the second half. Gabriel Jesus hit the crossbar with a powerful header before Philippe Coutinho's follow-up was deflected wide for a corner.
Keylor Navas was kept busy in the Costa Rica goal and the Real Madrid keeper pulled off an outstanding save from Neymar after Paulinho's cut-back.
Foiled by VAR
Neymar got increasingly frustrated as the half went on and his mood worsened further still when the video assistant referee (VAR) denied him a penalty after he felt he was dragged back by Gonzalez. The Costa Rican's hand did make contact with Neymar's chest but he didn't drag him down; Neymar fell to the floor himself and it was far too theatrical about it. Correct decision.
In injury time however, Costa Rica finally cracked. Gabriel Jesus nodded down Marcelo's cross in the box, Neymar got a slight touch on the ball and it landed at the feet of the onrushing Coutinho who fired home underneath Navas.
It was harsh on Costa Rica who now completely apart when Douglas Costa burst through the defense, squaring unselfishly to Neymar who tapped home from close range. He finally had his goal - and Brazil finally had their win.
As it happened:
+++ FULL TIME: Brazil 2 - 0 Costa Rica (Coutinho 90+1', Neymar 90+7') +++
90+7' GOAL! Brazil 2-0 Costa Rica (Neymar)
Neymar taps home from close range after an unselfish square ball from Douglas Costa.
90+4' Clever interchange between Firmino and Coutinho ends in the current Liverpool man shooting over from close range.
90+1' GOAL! Brazil 1-0 Costa Rica (Coutinho)
Jesus nods down Marcelo's cross, Neymar gets a slight touch on it, but it falls to the onrushing Coutinho who slides home what is surely the winner.
90' SIX MINUTES OF INJURY TIME
89' Navas punches a free kick clear, falls to the ground after a light collision, and stays down.
87' The next long shot comes from Casemiro - again, no trouble for Navas.
85' A harmless long-range effort from Coutinho is gratefully gathered up by Navas.
82' Into the final ten minutes as Navas claims a Marcelo cross. Brazil are running out of time but they're camped in Costa Rica's half.
81' Neymar is NOT happy.
79' VAR: Decision reversed!
At first glance, it looked like a clear penalty as Gonzalez appeared clearly dragged Neymar back in the box. But the VAR instructs Kuipers to have another look and, indeed, there isn't much contact at all. Gonzalez' hand makes contact with Neymar's chest but he doesn't drag him down, and Neymar's fall is theatrical. Correct decision.
78' PENALTY TO BRAZIL!
76' Neymar attempts to place a side-footed effort into the far corner but it's deflected wide for another Brazil corner ... which is cleared. When a throughball is played back in, Neymar's run is blocked but the Brazilian throws himself to the ground and Kuipers tells him to get up and get on with it.
73' The clock is ticking ... how long can Costa Rica hold on?
72' Huge chance for Brazil! Pacey Brazilian attack and the ball falls to Neymar, who takes one touch before curling a shot inches wide from the edge of the D. He could have taken the ball a bit closer there but opted to shoot early.
70' Corner for Brazil - Casemiro's free header is straight at Navas.
68' Substitution for Brazil: Paulinho is replaced by Roberto Firmino.
68' Half-chance for Costa Rica! Miranda clears with a vital header in front of goal and when the ball is sent back across, no Costa Rica player can get a touch.
67' The game has returned to the patterns we saw in the first half, with Brazil lacking in creavity. A weak Neymar shot has bounced off Nevas but there was nobody following up.
60' ... but it's wasted at the near post. Costa Rica have another half-chance as Brazil fail to clear - but Brazil do eventually get it away and resume their siege of the Costa Rican penalty area.
59' Costa Rica win their first corner of the game ...
58' Coutinho fires in a low drive but Navas is there again, initially spilling the shot but quickly pouncing on the ball.
56' What a save from Keylor Navas! The Real Madrid keeper gets a brilliant hand to Neymar's close-range effort after Paulinho's cut-back. Brazil are getting closer.
54' The introduction of Douglas Costa has had an instant impact. Brazil have come out for the second half with more urgency and more tempo.
51' The pressure grows with a series of Brazil corners. Can they make one count?
49' CROSSBAR! Gabriel Jesus heads against the bar!
48' Almost calamity in the Costa Rica box but Navas reacts quickly to clear a back-pass. When the ball is crossed back into the danger area, Neymar clatters into Navas and the referee awards a free-kick.
+++ SECOND HALF +++
We're back underway. Brazil have made one chance, bringing former Bayern Munich winger Douglas Costa on for the ineffective Willian
+++ HALF-TIME: Brazil 0 - 0 Costa Rica +++
For all the quality in their ranks, Brazil have been limited to Neymar free-kicks and long-range efforts from Marcelo - none of which have come close to troubling Keylor Navas in the Costa Rican goal. The underdogs have defended solidly in a 5-4-1 formation and have even posed a slight threat on the break. Indeed, the best chance of the game fell to midfielder Celso Borges, who shot wide inside the box after Cristian Gamboa's clever cut-back.
43' Neymar collapses to the ground again but the challenge was fair. Get up and play on, says referee Kuipers.
41' Marcelo cuts onto his right foot and fires a low shot towards goal - but his Real Madrid teammate Navas gets down well to save at his near post.
39' That spell of increasing Brazilian pressure seems to have ended as Costa Rica continue to defend with great concentration and organization. Now they break out with Urena who draws a foul in the center-circle and the pressure is relieved.
34' Coutinho spreads the play out to Willian on the right. The Chelsea man cuts inside onto his left foot but fires high and wide.
32' Neymar cuts inside and chips a cross towards Jesus who proceeds to foul his marker and Costa Rica survive. "BRASIL!" is the chant from the yellow-clad fans who have packed out the arena in Saint Petersburg - they can sense their team are getting closer.
30' Coutinho, who scored a screamer in Brazil's opener against Switzerland, attempts a similar effort but it sails over.
29' Marcelo drags a left-footed shot wide from the edge of the box.
27' Neymar races onto a lovely throughball from Casemiro but Navas sprints off his line to clear. Brazil are starting to inject more tempo into the game.
26' Gabriel Jesus has the ball in the net but the flag is correctly raised, as he was offside when Marcelo's initial shot came in. But that was the first time that Neymar has run at the Costa Rican defence with pace, and it led to a chance.
23' The latest Neymar free-kick finds Thiago Silva at the back post but the PSG man's header drifts harmlessly wide. It's not easy to break down such a packed defence but Brazil are lacking a bit of ingenuity here.
21' Costa Rica certainly aren't holding back, and they're getting in Brazil's faces with their fouls. Veteran refereree Kuipers will be keeping a close eye on things, though.
19' ... this time, Neymar's high looping cross is easily claimed by Navas. I don't get the impression set-pieces are going to bring Brazil much joy this afternoon.
18' Neymar is dragged to the floor by Venegas and Brazil have another free-kick in a similar position ...
17' ... headed clear again.
17' Brazil have a free-kick on the left wing which Neymar will take...
13' Huge chance for Costa Rica! From the resulting free-kick, Gambao is played in down the right and gets to the by-line where he cuts back to Borges who drags his shot wide! What a chance for the underdogs.
12' Neymar loses possession in midfield and, in an attempt to win the ball back, fouls Urena.
10' Neymar's free-kick is poor and easily headed clear. I'm surprised he didn't opt to go for goal there; Keylor Navas had left one side of his goal wide open ...
9' The referee awards Brazil a free-kick on the edge of the box after Guzman brings down Willian.
7' A first spell of possession for the Costa Ricans results in a throw in down on the left hand side. They work the ball back over to the right where full-back Cristian Gamboa fires over.
4' Costa Rica have set their stall out quite clearly here: 5-4-1. With an emphasis on the five and the four.
3' Gabriel Jesus tries and fails to turn in the box after Willian's cross from the right, before Philippe Coutinho fires over from distance.
2' Marcelo attempts a sweeping cross-field ball from left-back which goes nowhere near a teammate. The Real Madrid man still adjusting his radar, clearly.
+++ KICK-OFF +++
We're underway in Saint Petersburg! Brazil in their changed kit of all blue kicking from left to right. Costa Rica all in white kicking from right to left. The referee is Björn Kuipers of the Netherlands.