It appeared that the Selecao, who drew with Switzerland in their opening match of the tournament, were in for another frustrating day as Costa Rica goalkeeper Keylor Navas made a string of fine saves to keep the sides deadlocked.
Neymar cut a particularly exasperated figure, especially after a 78th-minute penalty that he had bought under the challenge of Giancarlo Gonzalez was overturned by Dutch referee Bjorn Kuipers after a referral to VAR.
Relive how the action unfolded at the Krestovsky Stadium with Sports Mole's minute-by-minute updates below.
12.30pmOne of football's South American giants was slain last night as Argentina were humbled 3-0 by Croatia. Now it is Brazil's turn to encounter a potential banana skin as they face 2014 quarter-finalists Costa Rica in Saint-Petersberg. Kickoff is at 1pm - let's get straight to the team news...
12.36pmNeymar is passed fit following fears that he had aggravated a previous foot injury when he missed training this week, but there is one enforced change for Brazil as Danilo drops out for Fagner at right-back. With Dani Alves also injured, the South Americans are down to their third choice in that position.
12.38pmOnce again, Manchester City striker Gabriel Jesus, who has 10 caps in 18 international appearances, is preferred to Liverpool's Roberto Firmino to lead the line. Firmino only has six goals in 22 Brazil caps, but he is undoubtedly coming off a better domestic season than his Premier League rival.
12.40pmFirmino's former Liverpool teammate Philippe Coutinho was Brazil's goalscorer in the first match with a trademark curling effort - one of few moments of real quality as Tite's side settled for a 1-1 draw with Switzerland. "We said after the last game we need to improve," Coutinho told BBC Sport.
12.42pmCosta Rica also make one change, and it is also at full-back as Bryan Oviedo, who may be playing in League One with Sunderland next season, comes in for Francisco Calvo in the five-man defence. Another British-based player - Celtic defender Cristian Gamboa - keeps his place on the opposite flank.
12.44pmJoel Campbell, who is somehow still on the books at Arsenal - he spent last season on loan at Real Betis - has to make do with a place on the bench. Ex-Fulham forward Bryan Ruiz, mercurial enough to wear Brazil yellow on his day but very inconsistent, is Costa Rica's attacking talisman.
12.46pmCosta Rica can only boast of one previous World Cup victory against South American opposition, although that did come four years ago when they beat Uruguay in the same group that England crashed out of. Campbell, as well as Oscar Duarte and Marco Urena, who do start today, were the scorers.
12.48pmUrena can consider himself lucky to keep his spot in the starting lineup after only having 14 touches in 67 minutes in the 1-0 defeat to Serbia, with three of those in the opposition box. After Campbell replaced him, he had 24 touches and four in the opposition box in only a third of the time.
12.50pmBrazil are currently suffering from their worst World Cup run in 40 years. They are winless in three matches for the first time since June 1978, when they went four matches without victory. Their defence has been to blame - they have conceded 10 of last 13 shots on target faced at the World Cup.
Of course, seven of those were against Germany on that infamous night in Belo Horizonte four years ago.
12.52pmThat was a painful evening for all of Brazilian football, particularly poster boy Neymar, who missed the semi-final humiliation through injury. He was in the wars again against Switzerland - fouled 10 times which is the most a player has been fouled in a World Cup match since 1998, when England's Alan Shearer was fouled 11 times against Tunisia.
12.54pmHEAD TO HEAD: Brazil have won nine of their last 10 internationals against Costa Rica, losing only in a friendly in March 1960. This is their third World Cup meeting, with the Selecao winning the previous two including a 5-2 victory en route to lifting the trophy in 2002.
12.56pmJust under five minutes until kickoff, and the players are out for the national anthems. A reminder that Costa Rica will be knocked out today if they lose. No result for Brazil will determine their fate this afternoon, although a win would set them up nicely for a potential final-game showdown with Serbia.
12.58pmPREDICTION: Brazil have topped their first-round group in every World Cup since 1982, and they really need to win today to continue that record. I think they will, and I also think this will be the match when one of the big boys finally makes a statement. Let's go for 3-0 Brazil.
1 minKICKOFF: We are underway in Saint-Petersburg, where our officials are from Netherlands, led by the experienced Bjorn Kuipers. Brazil are in their changed all-blue strip, with Costa Richa in white.
3 minCoutinho's goal against Switzerland was his 11th for Brazil, and five of those have come from outside the box. The Barcelona playmaker has an early sighter here but it was always rising high of the crossbar.
5 minRuiz has taken up a position on the left for Costa Rica, which does take him away from where he can be most dangerous. "We need to win the ball back quickly and counter-attack quickly," the captain told BBC Sport this week. Based on his Fulham days, winning the ball back isn't really his game.
7 minFormer West Brom defender Gamboa was not judged good enough by Brendan Rodgers to get near his Celtic team, but he is a regular starter for his country. Gamboa only has three goals in 68 caps, which is hardly a surprise considering the wild nature of a long-range strike which finds row Z.
9 minCosta Rica goalkeeper Keylor Navas will be determined to impress this afternoon, with the man tipped to replace him at Real Madrid - Alisson - at the other end. Navas has helped Real to three Champions League titles but Madrid are reportedly looking at the Roma stopper. Mind you, so are a few others.
11 minCasemiro kicks the ball out of play and trots over to the touchline with a concerned look on his face. It is just a nose bleed that he needs tending to, and Brazil play keep ball while a man down.
13 minCHANCE! Costa Rica should be in front, with a brilliant change of pace from Gamboa leaving Paulinho in his wake on the Brazil left. The cutback is into a decent area, and Celso Borges runs onto it but steers his side-footed effort just wide of the post.
15 minAnother brief stoppage here, but this one of genuine concern with Neymar going over on his ankle. The former Barcelona star has not begun the match convincingly with a couple of sloppy passes and set-piece deliveries, and he doesn't seem to be moving too freely.
17 minEven short of full fitness, Neymar still has the potential to rip Costa Rica apart and a lovely bit of skill here, lifting the ball over Gamboa's head and running clear, shows that he is in the mood, dodgy ankle or not. It takes a cynical trip to bring him down and somehow Gamboa escapes a yellow card.
19 minCoutinho has started to find a little bit of space in the middle of the park and he gets away from Borges on the half turn here, but then badly overhits his attempted through-ball to Jesus.
21 minJesus is looking a little isolated at the head of the Brazil attack at the moment. Willian is hugging the right touchline and Neymar is coming deep to drop the ball. This is where Firmino would be more proactive in getting himself involved, but it might leave the South Americans without a direct outlet.
23 minThe Man City forward is involved here, winning a free kick which Neymar, of course, whips into the box. Thiago Silva wins the header but cannot direct it even remotely close to Navas's goal.
25 minBrazil are just starting to go through the gears here. Both Neymar and Jesus have embarked on adventurous runs forward but on each occasion Costa Rica have got in an important tackle.
27 minDISALLOWED! An unbelievable touch and finish on the volley from Jesus is in vain as he is rightly flagged offside from the Marcelo shot which was deflected into his path.
28 minCHANCE! A beautiful pass from Coutinho finds the run of Neymar off the left. His first touch is a little heavy, and some hesitation allows Navas to dart off his line and smother at his feet.
30 minSHOTS! Marcelo has taken up camp in the Costa Rica half, dragging a 20-yard shot a few yards wide. Coutinho follows up that effort with an attempted repeat of his Switzerland strike but he doesn't quite generate the bend to trouble Navas at his far post.
32 minIt is starting to feel like a matter of time for Brazil. On the left, Marcelo releases Neymar who cuts back onto his right foot and stands up a cross which Ovideo does really well to head clear under pressure from Jesus at the far stick.
34 minCosta Rica need to try to take the sting out of the game by keeping possession for a few minutes, but they can't get hold of the ball. Willian has largely been a spectator on the right and takes a rare opportunity with the ball to cut inside, but he can't control a left-footed shot which skews high and wide.
36 minMarcelo knocks in a decent cross but Jesus is in the box on his own against three centre-backs and the ball is cleared. Paulinho is usually the type of midfielder who makes a late run into the area - bagging nine goals for Barcelona in such a fashion last season- but he was way off the pace there.
38 minReferee Kuipers has a stern word with Urena after he leaves a foot in on Fagner. The lone Costa Rica striker has not seen the ball in 20 minutes and the frustration is written all over his face.
40 minDazzling skill from Marcelo frees him of two defenders and allows him the space to pick out Willian with a lovely switch of play. The Chelsea man wins a corner, and delivers it himself with Paulinho bundled to ground in the middle by Duarte. The referee looks at it closely but waves play on.
41 minSHOT! Coutinho is playing deeper than Marcelo for much of this match, and he shifts the ball on to the full-back who cuts inside and wraps his foot round a decent right-footed shot which his Real Madrid colleague is equal to in the Costa Rica goal.
43 minPaulinho finally makes a forward run and is in acres of space down the Brazil right. He knocks a cross into a decent area, but it is too far in front of Jesus, and Neymar cannot recycle play effectively at the back post.
45 minCosta Rica have had a lot of defending to do in the last 25 minutes but are finishing the half on the front foot. Guzman fails to spot a good chance to release Ruiz in the right channel and the attack dies a slow death.
1.49pmThe half-time whistle blows in Saint-Petersberg and once again we are goalless at the break in this World Cup - the ninth time that has been the case in 23 matches so far in Russia. Costa Rica kept Brazil in check for the first 20 minutes but since the Selecao have been knocking on the door for a goal.
1.51pmAlthough Brazil were camped in Costa Rica territory for the second half of that period, it took until the 41st minute for there to be a shot on target in the match when Navas saved from Marcelo. The Central Americans actually had the best chance of the half when Borges shot wide from 15 yards.
1.53pmNeymar had an interesting 45 minutes, again finding himself the target of some hefty Costa Rican challenges, and the referee was happy for most of them to go unpunished. The PSG forward had one half-chance when he latched onto Coutinho's pass, but good work from Navas thwarted Brazil's talisman.
1.55pmMarcelo was the standout player in that opening 45 minutes, but his central involvement may actually be to the detriment of Brazil, who look very imbalanced as they are only attacking down the left. They are missing Dani Alves at right-back, with Fagner nowhere near as dynamic going forward.
46 minKICKOFF: The action has resumed at the Krestovsky Stadium and Tite has made a change to try to break the deadlock. Douglas Costa, now permanently of Juventus, is on in place of Willian, who could count himself unfortunate having barely had a chance to influence proceedings.
48 minSome lovely one and two-touch passing cuts open the Costa Rica defence, and although Oviedo follows the run of Paulinho, his ill-advised back-pass puts his side in trouble. The follow-up cross is brought down by Neymar but Navas pounces to grab the ball before he can have a second touch.
50 minWOODWORK! This is the closest that Brazil have come, with Jesus thumping a heading against the crossbar. The rebound is recycled to Coutinho whose shot from 15 yards is deflected around the post by defender Acosta. So, so close for the Selecao but Costa Rica survive somehow!
52 minBrazil have already had three corners since the break which shows that they have started this second half much quicker than they did the first. Costa has made a bit of a difference; he is more direct than Willian and Brazil's midfielders are happy to give him the ball to run at Ovideo down the right.
54 minSUBSTITUTION: Costa Rica manager Oscar Ramirez responds to Brazil's strong start to the second half by making a change, swapping lone striker Urena for Christian Bolanos, who missed much of last campaign with a fractured ankle. He is the first Costa Rican to play at three World Cups (2006, 2014 and 2018).
56 minSAVE! Superb save from Navas to deny Neymar, tipping the ball over his crossbar after the PSG striker had run onto a cross from the right and met it with a sweet volley on the penalty spot.
58 minCHANCE! Navas comes to Costa Rica's rescue again, although this is a much easier save with Coutinho directing his shot straight at the goalkeeper from Paulinho's layoff. Again the threat came from the Brazil right - they look much better balanced with Douglas Costa instead of Willian.
60 minThe Central American underdogs have a chance to counter through substitute Bolanos, who has several teammates up with him but dribbles the ball into trouble and allows Miranda to make a tackle.
62 minJust as Brazil were reestablishing their dominance, Costa Rica are enjoying their best period since the opening 10 minutes. A loose ball drops to Venegas who tries an overhead from 15 yards out but completely mishits it. The half-chance came after good work from Bolanos who is having an impact.
64 minSHOT! Neymar has spent much of the match looking to cut inside from the left, but this time he goes the other way and creates enough space for a low shot which Navas grabs at the second attempt.
66 minPaulinho is starting to make those runs from deep which can make him a goalscoring threat. Douglas Costa aims to pick him out with a cross but Duarte makes a brave intervention with his head.
68 minSUBSTITUTION: It is time for Firmino, but as well as Jesus not instead of the Manchester City man. Paulinho is the man to make way, so Coutinho will drop a little deeper and the versatile Firmino will take up the No.10 role.
70 minCHANCE! Casemiro gets away from his marker from a corner but heads into the ground and straight at Navas.
72 minCLOSE! This is the moment that Neymar has been waiting for. A mistake from Gonzalez allows Brazil's talisman to pounce and he bursts through the middle only to send his curling shot over the crossbar from the edge of the box. He took the shot on early but couldn't get it on target.
74 minSUBSTITUTION: Gamboa, whose lively attacking performance may have come to the surprise of Celtic supporters, comes off for Francisco Calvo. He is a left-footed defender who started the first game and will slot into the back three, with Acosta being shifted to wing-back.
76 minBrazil want a penalty for a foul on Neymar but the forward has been given nothing all day and referee Kuipers is not about to change is tune now. Fourteen minutes plus stoppage time to go...
79 minVAR CONTROVERSY! For a minute, it looked as though Kuipers had changed his tune, because Neymar is initially given his penalty by the Dutch referee, who later goes to have a look at the incident on VAR and reverses his decision! Jesus slid a pass into Neymar who was lining up a shot, but turned back on himself and received the slightest of tugs from Gonzalez to unbalance him. Neymar can be seen begging for a foul on his way down and initially conned the referee, who eventually came to the right outcome.
81 minYELLOWS! Neymar's frustration boils over as he protests the latest call from the referee by punching the ball into the ground. Coutinho follows him into the book with dissent of his own.
83 minSUBSTITUTION: Final change for Costa Rica as Guzman is replaced by Yeltsin Tejeda, a regular in the 2014 team.
84 minYELLOW! Acosta is booked for time-wasting over a throw-in as Costa Rica begin to try to protect what they have. Three bookings now in this match, and none for fouls on players.
86 minIt is all very tight in the Costa Rica penalty area and Jesus and Neymar end up getting in each other's way after Casemiro's pass around the corner had picked the lock in the defence.
87 minSHOT! Costa skips by Oviedo and tees up Casemiro for a shot from the edge of the box, but the holding midfielder didn't quite catch it flush and Navas gets his body behind it.
89 minThis is all getting a bit silly now. There is a stoppage in play as Duarte falls to the floor grabbing his face, following a Marcelo push to the chest, and then Navas takes his turn to playact after punching clear a Neymar cross. The referee has no choice but to stop play but he has lost control here.
90+1 minGOAL! BRAZIL 1-0 COSTA RICA (PHILIPPE COUTINHO)
90+1 minBrazil have snatched victory at the death through Coutinho! Firmino wins a brilliant header in between two centre-backs, and a poor touch from Jesus allows Coutinho to run onto the loose ball late and stab it through the legs of Navas, who has been unbeatable until now, from close range. The Brazil bench empties, manager Tite takes a stumble; absolute scenes in Saint-Petersberg!
90+3 minThere is surely no way back for Costa Rica now although we are in the midst of SIX minutes of stoppage time. The officials may add to that as well following the extensive Brazil celebrations.
90+4 minSUBSTITUTION: Fernandinho is on to see this game out for Brazil, with Jesus trudging off slowly.
90+5 minCHANCE! Firmino has a chance to seal the result for Brazil but he gets underneath the ball and scoops his shot high and wide, after good work from Coutinho and Neymar in the build-up.
90+6 minNeymar gets the goal that a whole nation was desperate for him to get to settle the match. Casemiro drives forward and releases Costa to his right, and he is selfless enough to square for the PSG forward to tap home on the volley from six yards. That goal - his 56th for Brazil - takes him above Romario to third in the all-time in his country's scoring charts. Just the small matter of Ronaldo and Pele to catch now.
3.08pmWhat a finish at the Krestovsky Stadium. It looked as though Brazil were going to be held to another frustrating draw, but they pulled it out of the bag in stoppage time with goals from Coutinho and Neymar, who was in tears at full time. So were Costa Rica's fans - they are knocked out with defeat.
3.10pmThat's it from me, but Sports Mole's World Cup coverage for the day is far from done. Next up is Nigeria vs. Iceland, which you can follow with my colleague Darren Plant here. We also have Switzerland vs. Serbia later this evening so do stay with us. Thanks for joining me today!