(CNN) -- A last-gasp own goal from Sasa Papac handed five-time World champions Brazil a 2-1 victory over Bosnia in an international friendly in Switzerland.
The Glasgow Rangers defender diverted Hulk's late effort into his own net to give the Selecao a win in their first outing of 2012.
Real Madrid defender Marcelo had put them in front on four minutes when he fired into the net after a fine run and pass from Barcelona's Daniel Alves.
Nine minutes later Bosnia pulled level as Inter Milan goalkeeper Cesar failed to prevent Vedad Ibisevic's weak shot going into the net from range.
But Brazil, who boasted two-time world player of the year Ronaldinho and in-demand Santos striker Neymar among their ranks, received a late stroke of luck via the unfortunate Papac.
Brazil's next major tournament will be the 2014 World Cup on home soil, and as hosts they qualify automatically, so the team will have to hone their preparations during a series of friendly fixtures.
In Tuesday's other international friendly, Serbia beat Armenia 2-0 thanks to goals from Stuttgart midfielder Zdravko Kuzmanovic and Chelsea defender Branislav Ivanovic.