Two late goals by Philippe Coutinho and Neymar saved Brazil's blushes as they gained their first win at the 2018 FIFA World Cup.
2018 FIFA World Cup
Result: Brazil vs Costa Rica
Date: 22 June 2018
Venue: Saint-Petersburg Stadium
Brazil dominated possession from the kick-off, and had 68% of the ball in the first 10 minutes, while Costa Rica were happy to sit back and focus on counter-attacks.
However, the first big chance fell to Costa Rica's Celso Borges, who was played in from the right wing but could not find the target from the penalty spot.
Gabriel Jesus had the ball in net for the Selecao after 26 minutes but his effort was rightfully ruled offside.
Brazil turned up the heat around the half-hour mark without being able to create too many clear-cut chances as Costa Rica continued to frustrate the favourites. Marcelo had a shot saved in the 42nd minute, before the game went goalless into the break.
Neymar was then gifted the ball by Costa Rica's defence but was not able to hit the target from the edge of the box.
Brazil's No. 10 then thought he had a penalty with just 10 minutes to play, but the referee revised his initial call with the help of VAR.
Coutinho eventually found the opener in the first minute of added time after Roberto Firmino set up Jesus with a header, but the latter miscontrolled the pass before the former Liverpool star poked home from close range.
Neymar netted Brazil's second in the 96th minute after being played in by Costa, scoring his first goal of the World Cup.
The victory saw Brazil move to the top of Group E with four points, while Costa Rica remained with points. Second-placed Serbia, who beat Costa Rica in the first round of fixtures, will battle it out against Switzerland, who held Brazil to a draw, in the other game of the group.