(CNN) -- Brazil opened their Olympic football campaign with an unconvincing 1-0 win over Belgium who ended Thursday's match in Shenyang with only nine men.
Hernanes is mobbed by teammates after striking the decisive winner in Shenyang.
Hernanes scored the only goal of the Group C game with a fierce left foot strike in the 79th minute shortly after Belgium captain Vincent Kompany had been sent off by referee Khalid Al Ghamdi for a second yellow card.
Belgian midfielder Marouane Fellaini also went in the closing moments in controversial circumstances for an innocuous foul with minimal contact. He complained bitterly to the fourth official and had to be ushered off the field by teammates.
"It's always important to get a win in the opener," Brazil coach Dunga told the Associated Press. "We have a game against New Zealand now and we have to focus on that."
The sendings-off overshadowed a fighting display by the Belgians against a star-studded Brazil team including AC Milan's Ronaldinho and Alexandre Pato.
Diego and Rafinha were also allowed to take the field after their German club sides Werder Bremen and Schalke did not invoke a Court of Arbitration in Sport ruling on Wednesday which would have prevented them from playing in the Games.
Brazil are desperate to win Olympic gold for the first time, but on the evidence of their first half display will need to improve to meet their ambition.
Sparked by Ronaldinho and Pato, they improved after the break with Pato curling a shot wide and then nearly forcing the ball home after excellent work down the left by his new teammate.
But Belgium also had their moments as striker Kevin Mirallas shot narrowly wide from the inside the area and generally troubled Brazil.
The dismissal of Kompany in the 72nd minute for pulling back Diego changed the course of the match as gaps started to open in the Belgium defense.
Persistent work by Diego helped him find Hernandes who showed excellent skill to evade several challenges and fire an unstoppable shot past goalkeeper Logan Bailly. Brazil had a goal disallowed in injury time when defender Breno was flagged offside.
The later Group C match saw hosts China grab a late 1-1 draw against New Zealand as Manchester United's Dong Fangzhuo equalized on 86 minutes.
In other Olympic football action on Thursday, Italy beat Honduras 3-0 in Group D. First-half goals from forwards Sebastian Giovinco and Giuseppe Rossi and another from Robert Acquafresca after the break sealed an easy win. South Korea and Cameron shared a 1-1 draw in the same group.
The United States also made a winning start as they beat Japan 1-0 in Group B while Serbia and Australia shared a goal apiece in Group A. The later match in this group also saw a draw, with Nigeria and the favored Netherlands drawing a blank.
Copyright 2008 CNN. All rights reserved.This material may not be published, broadcast, rewritten, or redistributed. Associated Press contributed to this report.