Two late goals from Philippe Coutinho and Neyma in injury time of the match gave Brazil their first win since of the the FIFA 2018 World Cup.
The five-time winners seemed poised for another draw, especially after a penalty awarded to Neymar was overturned by referee Bjorn Kuipers after consulting VAR.
However, Coutinho’s 91st-minute strike rescued the Selacao an important victory which puts them top of the group, and Neymar soon struck to consign Costa Rica to elimination.