Argentina forward Lionel Messi played - and scored - in a 2-1 win over the Ivory Coast after a late deal to allow him play in the Beijing Olympics was struck with his club Barcelona.
The Court of Arbitration for Sport (CAS) ruled yesterday that Barcelona was not obliged to release him for the tournament - raising the prospect that he could be called home.
The CAS upheld an appeal from the Spanish club after Fifa, soccer's world governing body, said clubs must release eligible players.
Barcelona were keen to have Messi avaliable for their Champions League qualifier against Poland's Wisla Krakow later this month but their sports director Txiki Begiristain told a news conference they had reached a deal over insurance and release from future friendly games.
"We took the decision last night before we flew back from New York to Barcelona after hearing the decision from CAS. Messi will play the Olympics.
"We spoke to the player first of all and with our coach Pep Guardiola.
"We have an agreement that there is an insurance that will cover the whole of the player's salary if he is injured.
"We also have the word of the Argentina Football Association president that he will be released from having to play friendlies for the whole of the season.
"We wanted the player to be happy and he is," added Begiristain.
Messi put Argentina 1-0 up in the 43rd minute but the Ivory Coast struck back with a goal through Sekou Cisse before an Argentine winner from Lautaro Acosta four minutes from time.
The hosts scored a late equaliser through Dong Fangzhuo to rescue a point, while the Netherlands and Nigeria finished scoreless.
South Korea had to settle for a point after Cameroon's Georges Mandjeck equalised Park Chu Young's 68th minute goal.
Earlier today, Brazilian's Rafinha and Diego, who were also part of the CAS judgment after their clubs Schalke 04 and Werder Bremen appealed, both played and enjoyed a 1-0 win over Belgium.
Hernanes got the winner for Dunga's side in the 79th minute. Manchester United's Anderson and Liverpool's Lucas also featured in central midfield.
AC Milan striker Ronaldinho captained the side.
World champions Italy were quick off the mark with a 3-0 win over Honduras. Former Manchester United striker Giuseppe Rossi got the second in between goals from Sebastien Giovinco and Roberto Acquafresca.
Holden Stuart grabbed the only goal in the 47th minute as the USA beat Japan, while Australian and Serbia drew 1-1 after the latter's Slobodan Rajkovic equalised Ruben Zadkovich's 69th minute opener.