Brazil's poster boy Neymar scored twice and the outstanding Oscar added a late third as the hosts came from behind for a dramatic 3-1 victory over Croatia in a thrilling World Cup opening match on Thursday.
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.
Neymar created Brazil's first opening when he jinked along the byline, resulting in a half-cleared ball to Oscar who slammed in a curling 25-metre drive that goalkeeper Stipe Pletikosa acrobatically pushed away.
But Croatia's reprieve only lasted seven minutes and the equaliser was greeted by scenes of unbridled joy.
Oscar started the move by beating two men in midfield before finding Neymar who advanced a few metres before cracking in a low left-foot shot that went in off the base of Pletikosa's left-hand post for his 32nd goal in his 50th international.
Neymar scored his 33rd when Pletikosa got both hands to his penalty but could not stop the ball from going in and Oscar wrapped up the win in the dying minutes.
Earlier, the D-day for Brazil finally arrived after 64 years in mixed circumstances. Nearly half the world's population, well over 3 billion spectators, watched soccer's premier event and got a glimpse of the country that in two years will host the Summer Olympics.
The opening ceremony for the World Cup got underway at Arena Corinthians. American star Jennifer Lopez added a dash of glamour to the colourful ceremony in a vivid contrast to the violent anti-tournament protests in the city.
J-Lo, wearing a carnival-inspired and revealing green outfit, appeared from a trapdoor along with rapper Pitbull to sing the official World Cup song with Brazilian singer Claudia Leitte.
The festivities began ahead of the opening game of the four-week long tournament.
But it didn't start without a trouble as military police in the city clashed with masked anti-World Cup protesters demonstrating against the huge cost of staging the tournament.
The clashes came after police fired tear gas and rubber bullets to break up an earlier, smaller protest near a Sao Paulo subway station.
A crowd of more than 60,000 people, including 12 foreign heads of state, watched the tournament's opening match.
"The world is going to see multitudes cheering for soccer -- but also demanding that our country change," Helen Santos, a school teacher, said as she walked home in Rio de Janeiro. "The world needs to see that we're a serious country. We're not just a nation of soccer, but a country striving and demanding the government provide better education and health care. The world needs to see the reality of Brazil, not just the sport."
BRAZIL: Julio Cesar - Dani Alves, Thiago Silva (captain), David Luiz, Marcelo - Oscar, Paulinho (Hernanes 63), Neymar (Ramires 88), Luiz Gustavo, Hulk (Bernard 68) - Fred
Yellow card: Neymar (27), Luiz Gustavo (88)
CROATIA: Stipe Pletikosa - Darijo Srna (cap), Vedran Corluka, Dejan Lovren, Sime Vrsaljko - Ivan Perisic, Luka Modric, Mateo Kovacic (Marcelo Brozovic 61), Ivan Rakitic, Ivica Olic - Nikica Jelavic (Ante Rebic 78)
Yellow card: Vedran Corluka (65), Dejan Lovren (69)
Referee: Yuichi Nishimura.