Rio de Janeiro: Brazil went behind for the first time in eight games on Wednesday but responded with a controversial equaliser before netting a dramatic winner deep into stoppage time for a 2-1 victory over Colombia in the Copa America.
Brazil had won their previous nine games coming into the match in Rio de Janeiro, all bar one of them without conceding a goal, but they went behind in the 10th minute thanks to a wonder strike from Luis Diaz.
Juan Cuadrado swung in a cross from the right and Porto midfielder Diaz leapt acrobatically to volley an overhead kick past a helpless Weverton.
Brazil were forced to chase the game and they had most of the ball and almost all the chances, though Colombia did an excellent job of closing them down in the final third.
The hosts eventually got an equaliser with 12 minutes remaining, though it came in controversial circumstances.
With Brazil on the attack the ball hit referee Nestor Pitana and as Colombia's players paused expecting him to order a drop ball the Argentine, who refereed the 2018 World Cup final, allowed play to continue.
Brazil took full advantage as Roberto Firmino headed home a cross from the left, with goalkeeper David Ospina letting the ball squirm through his hands on the night he tied Carlos Valderrama as Colombias most capped male player with 111 appearances.
The Colombian players were incensed but the goal was allowed to stand, even after a check by the Video Assistant Referee.
And worse was to come for the visitors.
Their protests after the equaliser led to 10 minutes of stoppage time being added, and in the 100th minute of the match Casemiro headed home from a corner to give Brazil the win.
Brazil have already qualified for the quarter-finals and will be joined by three other teams from the group, with Colombia, Ecuador, Peru and Venezuela vying for the spots.