But the 71st-minute penalty from Neymar that tipped the Group A game Brazil's way seemed a soft one after Japanese referee Yuichi Nishimura harshly ruled that Croatia skipper Dejan Lovren had fouled Fred who appeared to throw himself to the ground.
Neymar had brought Brazil back into the game after 29 minutes with the equaliser after defender Marcelo put through his own net after 11 minutes to give Croatia a shock lead.
Marcelo's misfortune meant he became the first Brazilian ever to score an own goal at the World Cup.
The cross came from Ivica Olic whose low ball from the left went through the legs of Brazil skipper Thiago Silva, clipped Nikica Jelavic's foot and bounced in off Marcelo with keeper Julio Cesar helpless.