Each Brazil goal, two scored by Neymar -- the second after a dubious penalty won by Fred -- and a third by Oscar was greeted by a flurry of fireworks bursting across the Sao Paulo skyline.

Croatia had had the impertinence to take the game to the hosts -- and score first courtesy of an own goal by Marcelo but the drive of Brazil not to fail on such an occasion proved decisive.

This was a game brimming with breathtaking technical skill, and not just from Brazil.

All eyes had been on the green and gold shirts in the days beforehand, but inspired by Luka Modric, it was those in red and white checks who had by far the better of the opening exchanges.

Croatia, displaying their own technical gifts, gave fair warning when Ivan Perisic's perceptive cross was met by his Wolfsburg team-mate Ivica Olic with a powerful downward header. Brazil held its collective breath but it bounced up past the angle.

That relief turned to dismay in the 11th minute as Olic took advantage of some wide open space down the left to fire in a cross that nicked off Nikica Jelavic's instep and bounced off the bewildered Marcelo to roll into the net.

"I stayed calm because if I let myself get down I would have hurt the team," Marcelo said. "It's not the first time that this has happened, so you have to stay relaxed to help the team."

This started to look serious: Brazil, the only country to play in every World Cup, were in danger of becoming the first host nation to lose their opening match unless it raised its game.

As it turned out, the shock of going behind was electrifying. Brazil began to attacked with gusto, Neymar's wonderful feet at the centre of the action.

The influence of Chelsea's Oscar began to grow, and his dangerous cross hung temptingly in the air but Neymar's acrobatic attempt failed to make the right contact.

Oscar then tried himself, bringing a terrific save from Stipe Pletikosa as the ball seemed to be curling into his top right-hand corner.

It was time for Neymar to take centre stage, after being only booked for what looked a forearm smash on Modric, he struck the equaliser in the 29th minute. Oscar was deeply involved in the build-up and though it may not have been the cleanest strike Neymar has ever hit, his shot went through the legs of a defender and in off the post.

The darkening skies around the Arena Corinthians lit up as a nation celebrated.

"It's important to start these tournaments with the right foot, with a victory," Neymar said. "I'm happy that I got to score, but the entire team deserves credit. We maintained our calm and showed we could battle back."

Croatia's touch deserted them, the task suddenly seemed too daunting, and there was a heady air of expectation among the home fans.

Into the second half and Brazil took a more patient approach, putting Croatia under increasing pressure.

Dani Alves fired a free-kick too high after Vedran Corluka had crudely chopped down Neymar, then Oscar picked out David Luiz but he couldn't keep his header down.

Then came the controversy. Fred manoeuvred for the ball in the Croatia penalty area, and Southampton centre-back Dejan Lovren laid barely a finger on his shoulder for the Brazil striker to fling himself down. Japanese referee Yuichi Nishimura awarded the softest of spot-kicks, dispatched by Neymar despite Pletikosa getting his fingers to it.

"If that was a penalty, we should be playing basketball. Those kinds of fouls are penalized there," Croatia coach Niko Kovac said. "That is shameful, this is not a World Cup referee. He had one kind of criteria for them and another for us. The rules were not the same."

Croatia tried to respond, and had the ball in the net only for Olic to be penalised for a hefty challenge on keeper Julio Cesar, and it was left to Oscar to surprise Pletikosa with a steered finish with the toe of his boot to send the hosts into raptures.

"The team didn't give up," Brazil defender David Luiz said. "We knew it would be hard but we played well and got that first goal and then the victory."