Brazil’s Thiago Braz da Silva set an Olympic record of 6.03m to win gold in the men’s pole vault at Rio 2016.
Defending champion Renaud Lavillenie of France looked on course to retain his title after clearing a height of 5.98m.
Da Silva, 22, who passed at 5.98m, failed his first attempt at 6.03m but went clear with his second to win the hosts’ second gold medal of the Games.
Lauvillenie, booed by the partisan crowd, took silver, while American Sam Kendricks sealed bronze with 5.85m.
“The crowd were cheering me too much. I had to fix my mind on my technique, forget the people,” Da Silva said.
“The gold? Incredible. My first time over six metres. My home town wanted me to win.”
The pole vault competition was delayed because of rain and then held up with a mechanical fault that temporarily saw the bar unable to be raised, but ended in a thrilling conclusion that finished just before midnight local time.
Da Silva added 11 centimetres to his previous personal best to set a national record and become only the fourth Brazilian to win a track and field gold at a Games.
The last Brazilian Olympic gold medallist in an athletics event was Maurren Maggi, who won the women’s long jump at Beijing 2008.
‘Disrespected like Jesse Owens’
World record holder Lavillenie had to appeal for quiet from the Rio crowd as he prepared for a jump at 6.08m which would have put him back into the lead, and gave a thumbs down gesture to the cameras.
“In 1936 the crowd was against Jesse Owens. We’ve not see this since. We have to deal with it,” he said.
“For the Olympics it is not a good image. I did nothing to the Brazilians.”
African-American athlete Owens won four gold medals at the 1936 Olympics in Berlin, which were being used by Adolf Hitler to promote Nazi ideologies of racial superiority.
Lavillenie added: “There was no fair play from the public.
“You see it in football. It is the first time I have seen it in track and field. It is the biggest moment of your life. I can’t be happy about that. Now I have to wait four years to get back the gold.”