A referee was chased off the field at the Maracana stadium by players furious after he failed to award them a stoppage-time penalty.
Carlos Eugenio Simon, who refereed at last year's World Cup, left the pitch under police protection following Botafogo's 2-1 win over Atletico Mineiro in a Copa Brasil quarter-final second leg.
Botafogo went through 4-3 on aggregate after Atletico had a penalty turned down in the dying minutes. A second goal would have sent Atletico through on away goals in Botafogo's place.
As soon as he blew the final whistle, Atletico players rushed towards Simon who ran off the pitch. They were heard to insult the official who was quickly surrounded by police and security men.
Eder Luis put Atletico ahead with a breakaway goal before halftime but Andre Lima and Alex scored in the first 10 minutes of the second half as Botafogo turned the game around.
Botafogo held on despite having Leandro Guerreiro sent off in the 85th minute.