A sniper requested permission to shoot an armed man whose presence near world leaders attending the World Cup's June 12 opening game sparked a security scare, Brazilian officials said.
The man turned out to be a military police officer who had been sent to the restricted area at Sao Paulo's Corinthians Arena unbeknownst to the civilian police, and no shot was fired, authorities said.
President Dilma Rousseff and a dozen other world leaders were on hand for the opening ceremony and Brazil's 3-1 victory over Croatia, along with more than 60,000 fans.
"A civilian police sniper detected the presence of someone carrying a gun and wearing a bulletproof military police vest in a restricted area," Sports Minister Aldo Rebelo said.
"Since that area offered access to the authorities, not just President Dilma Rousseff but all the heads of state, the sniper requested authorisation to target him."
Authorities denied the request while they checked the man's identity, the minister said. Once identified, he was removed from the area.
The public security secretariat for Sao Paulo state sought to play down the incident, which it called "a communication error" that was quickly corrected.
It said there was a three-part protocol for a police sniper to open fire: he must receive permission to load his rifle; receive permission to take aim; and receive permission to shoot.
Newspaper Folha de Sao Paulo said the military policeman involved was from a tactical unit and was in the area investigating a bomb alert that turned out to be a false alarm.
The sniper feared he was an attacker disguised in police uniform, said the daily.