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).
Line-ups
Brazil
Formation 4-4-2
- 12Weverton
- 2Danilo
- 4Marquinhos
- 3Thiago Silva
- 6Alex SandroBooked at 14minsSubstituted forLodiat 62'minutes
- 11Éverton RibeiroBooked at 27minsSubstituted forFirminoat 45'minutes
- 5Casemiro
- 8FredSubstituted forLucas Paquetáat 68'minutes
- 7RicharlisonSubstituted forBarbosa Almeidaat 77'minutes
- 9Gabriel JesusSubstituted forSousa Soaresat 77'minutes
- 10NeymarBooked at 87mins
Substitutes
- 1Alisson
- 13Emerson Royal
- 14Militão
- 15Fabinho
- 16Lodi
- 17Lucas Paquetá
- 18Vinícius Júnior
- 19Sousa Soares
- 20Firmino
- 21Barbosa Almeida
- 23Ederson
- 25Douglas Luiz
Colombia
Formation 4-4-2
- 1OspinaBooked at 81mins
- 16Muñoz
- 13Mina
- 23D Sánchez
- 6Tesillo
- 11Ju CuadradoBooked at 70mins
- 5BarriosBooked at 90mins
- 15Uribe
- 14DíazSubstituted forMurilloat 90+1'minutes
- 18BorréSubstituted forCuéllarat 64'minutesBooked at 90mins
- 7ZapataSubstituted forBorjaat 64'minutes
Substitutes
- 2Medina
- 3Murillo
- 4Cuesta
- 8Cuéllar
- 9Muriel
- 10Cardona
- 12Vargas
- 19Borja
- 22Quintana
- 25Perlaza
- 26Fabra
- 28Chará
- Referee:
- Néstor Fabián Pitana
Match Stats
- Possession
- Home69%
- Away31%
- Shots
- Home15
- Away3
- Shots on Target
- Home4
- Away2
- Corners
- Home8
- Away1
- Fouls
- Home15
- Away16
Live Text
Post update
Full Time
Second Half ends, Brazil 2, Colombia 1.
Booking
Gustavo Cuéllar (Colombia) is shown the yellow card for a bad foul.
Post update
Neymar (Brazil) wins a free kick in the defensive half.
Post update
Foul by Gustavo Cuéllar (Colombia).
Goal!
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.
Booking
Wilmar Barrios (Colombia) is shown the yellow card for a bad foul.
Post update
Corner, Brazil. Conceded by William Tesillo.
Post update
Attempt blocked. Danilo (Brazil) right footed shot from the right side of the box is blocked. Assisted by Roberto Firmino.
Post update
Neymar (Brazil) wins a free kick in the attacking half.
Post update
Foul by Mateus Uribe (Colombia).
Post update
Foul by Neymar (Brazil).
Post update
Yerry Mina (Colombia) wins a free kick in the defensive half.
Post update
Marquinhos (Brazil) wins a free kick in the attacking half.
Post update
Foul by Miguel Borja (Colombia).
Substitution
Substitution, Colombia. Óscar Murillo replaces Luis Díaz.
Post update
Attempt saved. Miguel Borja (Colombia) header from the centre of the box is saved in the bottom left corner.
Post update
Foul by Casemiro (Brazil).
Post update
Miguel Borja (Colombia) wins a free kick on the left wing.
Booking
Neymar (Brazil) is shown the yellow card for a bad foul.