Match ends, Brazil 2, Colombia 1.
Casemiro scored deep into stoppage time to give hosts Brazil a controversial win over Colombia in the Copa America.
An acrobatic volley by Luis Diaz gave Colombia an early lead in their final Group B game in Rio de Janeiro.
Roberto Firmino's late equaliser was allowed to stand despite the ball hitting the referee moments earlier, sparking lengthy protests by Colombia.
And in the 10th minute of added time, Casemiro headed in from a Neymar corner to maintain Brazil's 100% record.
Brazil were struggling to draw level when Neymar's wayward pass forward struck Nestor Pitana, who took charge of the 2018 World Cup final.
The Argentine referee put his whistle to his mouth but allowed play to continue once Lucas Paqueta had played the ball wide to Renan Lodi, whose first-time cross was headed in by Liverpool forward Firmino.
There was a lengthy stoppage as Colombia players remonstrated with Pitana, before and after the video assistant referee let the goal stand.
The rules state that if the ball touches the referee and goes directly into the goal, results in a change of possession or a promising attack, a dropped ball should be awarded.
Neymar's pass would have been intercepted by a Colombia player had it not struck the referee, yet six seconds later the ball was in their goal.
"It's sad that with all the effort we made against one of the best teams in the world, we lost the match on a call like that," said Colombia winger Juan Cuadrado, who crossed for Diaz's stunning opener.
"A referee with that much international experience, who's refereed at the World Cup, makes a mistake and hurts the match. We never got past that play."
Despite the defeat, Colombia will still progress into the quarter-finals along with Brazil, who stretched their winning run to 10 games and have already qualified as group winners.
The hosts play their final group game against Ecuador in Goiania on Sunday (22:00 BST).
- 12Pereira da Silva
- 3Thiago Silva
- 6Lobo SilvaBooked at 14minsSubstituted forLodi dos Santosat 62'minutes
- 11de Barros RibeiroBooked at 27minsSubstituted forFirminoat 45'minutes
- 8FredSubstituted forTolentino Coelho de Limaat 68'minutes
- 7RicharlisonSubstituted forBarbosa Almeidaat 77'minutes
- 9Gabriel JesusSubstituted forSousa Soaresat 77'minutes
- 10NeymarBooked at 87mins
- 13Leite de Souza Junior
- 16Lodi dos Santos
- 17Tolentino Coelho de Lima
- 18Vinícius Júnior
- 19Sousa Soares
- 21Barbosa Almeida
- 25Douglas Luiz
- 1OspinaBooked at 81mins
- 23D Sánchez
- 11Ju CuadradoBooked at 70mins
- 5BarriosBooked at 90mins
- 14DíazSubstituted forMurilloat 90+1'minutes
- 18BorréSubstituted forCuéllarat 64'minutesBooked at 90mins
- 7ZapataSubstituted forBorjaat 64'minutes
- Néstor Fabián Pitana
- Shots on Target
Second Half ends, Brazil 2, Colombia 1.
Gustavo Cuéllar (Colombia) is shown the yellow card for a bad foul.
Neymar (Brazil) wins a free kick in the defensive half.
Foul by Gustavo Cuéllar (Colombia).
Goal! Brazil 2, Colombia 1. Casemiro (Brazil) header from the right side of the six yard box to the top right corner. Assisted by Neymar with a cross following a corner.
Wilmar Barrios (Colombia) is shown the yellow card for a bad foul.
Corner, Brazil. Conceded by William Tesillo.
Attempt blocked. Danilo (Brazil) right footed shot from the right side of the box is blocked. Assisted by Roberto Firmino.
Neymar (Brazil) wins a free kick in the attacking half.
Foul by Mateus Uribe (Colombia).
Foul by Neymar (Brazil).
Yerry Mina (Colombia) wins a free kick in the defensive half.
Marquinhos (Brazil) wins a free kick in the attacking half.
Foul by Miguel Borja (Colombia).
Substitution, Colombia. Óscar Murillo replaces Luis Díaz.
Attempt saved. Miguel Borja (Colombia) header from the centre of the box is saved in the bottom left corner.
Foul by Casemiro (Brazil).
Miguel Borja (Colombia) wins a free kick on the left wing.
Neymar (Brazil) is shown the yellow card for a bad foul.