Switzerland took a huge step towards the last 16 of the World Cup as Xherdan Shaqiri scored a brilliant solo 90th-minute victor against Serbia.
Brazil had been thwarted on multiple occasions in the second period, with Gabriel Jesus hitting the crossbar and Keylor Navas saving from Neymar, who was once more centre stage when his successful penalty appeal was overturned upon review from the video assistant referee.
With 20 minutes left, Gamboa made his first mistake and Neymar should have capitalized.
Just when the histrionics appeared to have failed the talismanic striker, Brazil made a breakthrough, with Philippe Coutinho providing the victor.
Brazil defender Danilo has been ruled out of Friday's Group E game with Costa Rica with a thigh problem and will be replaced by Corinthians right-back Fagner, the Brazilian Football Confederation said on Thursday.
"In these kind of games you will not have many chances - you might have two or three chances, which we clearly did create and it's a pity we didn't score", he added.
The Semanario Universidad newspaper wrote "The Sele (selection) bids goodbye to Russian Federation in the most cruel banner", while also praising Costa Rica's defensive masterclass against Brazil.
Musa, Nigeria's all-time leading World Cup scorer with four goals, gave his country the lead in the 49th minute after Victor Moses sprinted deep into the Iceland half and curled a cross to the near post.
"Not everyone knows what I've overcome to get here", Neymar said on Instagram.
Neymar came into this tournament after needing surgery on a broken toe in his right foot, an injury he picked up in late February.
The first goal scored by either team is going to set this match alive and I think we are going to see plenty of goals being scored during the course of the match, so make sure you are watching it later on this evening!
Celso Borges will follow in his father's footsteps on Friday when he plays for Costa Rica against Brazil as the family's World Cup odyssey against the five-time champions continues.
Neymar's emotions at the end highlighted Brazil's relief at getting their first win of the tournament after being held 1-1 by Switzerland in their opening match.
Despite Neymar's fitness concerns, Costa Rica coach Oscar Ramírez claimed his players will not target him in the same way the Swiss did.
Unlike Argentina and Lionel Messi, Brazil is still in a good position to advance to the round of 16. "We don't need referees in order to win the game; we just want it to be fair".
The Costa Ricans would not fall into the trap of focusing all their defensive efforts on Neymar, the midfielder said. Serbia will face Brazil in Moscow at the same time.