Brazil came from behind to open their Copa America campaign with a win, courtesy of a last-gasp strike from Douglas Costa.

Peru took a shock lead at the Estadio Municipal Bicentenario German Becker when Christian Cueva found the back of the net after just three minutes, before Barcelona star Neymar restored parity just two minutes later.

From there it was a tale of frustration for Brazil, who had to wait until deep into second-half stoppage time for Douglas Costa to secure the 2-1 win.

With Group C rivals Colombia slipping to a shock 1-0 defeat to Venezuela earlier on Sunday, Dunga’s side were looking to take advantage and cement their position as the team to beat in the group.

But they got off to the worst possible start when after just three minutes Cueva was opportunist enough to make the most of Brazil keeper Jefferson’s failed attempt to clear a poor back pass from David Luiz and tap home.

It was a combination forged in Barcelona that brought the Brazilians back on level terms in quick-fire fashion, with an unmarked Neymar getting on the end of Dani Alves’ cross to head home the equaliser.

Neymar then turned provider to secure all three points for his side as he drew four defenders before his pass put Shakhtar Donetsk midfielder Douglas Costa one-on-one against Peru custodian Pedro Gallese and he made no mistake.

“We expected to face a tough rival. Playing in these kind of tournaments, especially in South America is always hard. Nobody gives anything away. I believe that we played well ... It is always important to start winning,” Neymar said to the local press afterwards.