There was an incredible atmosphere inside the arena as the Selecao looked to make good on Luiz Felipe Scolari's promise that no-one could stop them winning the World Cup on home soil.
But they got off to the worst possible start when Marcelo turned the ball into his own net after just 11 minutes of what turned out to be a pulsating game.
Niko Kovac's side had started well and when Nikica Jelavic failed to get a strong contact on Ivica Olic's cross-shot, he joyfully watched as the ball hit the unfortunate Marcelo and bounced into the net.
The home crowd were stunned but their golden boy then took centre-stage as Brazil hit back through Neymar, whose first goal was a fine individual effort, struck home from outside the area and clipping the post on its way in.
And the hosts went in front when the same player scored from the penalty spot midway through the second half.
Croatia complained bitterly about the decision by referee Yuichi Nishimura to award the spot-kick, after Fred went to ground softly under a challenge from Dejan Lovren, but it was to prove decisive as the Barcelona star duly tucked home the penalty.
The Europeans rallied impressively, but Oscar made it three for Brazil at the death as he toe-poked home from outside the area to ensure Scolari's men started with a win.