The first-ever Olympic surfing gold medalist almost didn't qualify because thieves stole his passport

Brazilian Ítalo Ferreira holds the honor of being the first athlete to win an Olympic gold medal in surfing. But it almost didn't happen after a chaotic travel story at the 2019 ISA World Surfing Games.

The competition, which was also qualification for the Olympics, was held at Kisakihama Beach in Miyazaki, Japan, from Sept. 7-15, 2019. While in the U.S. ahead of the competition, Ferreira's vehicle was broken into on Sept. 8 and his passport was stolen. His visa to get into Japan was also taken.

The only choice he had was to apply for a new passport and visa to get into the country. He was hurrying to get to Miyazaki on time when a freak typhoon delayed the flight. The trip took an extra 18 hours.

He arrived as his heat was already underway and the beach was still 10 minutes from the airport. Ferreira, 27, raced to the beach, still in jean shorts for travel, and got there with somewhere between eight and nine minutes left on the clock. He had a 12-point deficit to make up.

Ferreira borrowed a surfboard from a fellow Brazilian surfer, Filipe Toledo, and set out for the waves.

It was dubbed his "Miracle Heat," and Ferreira won the competition as well as locked in a spot for the first-ever surfing competition at the 2020 Olympic Games.

"I came from the trash straight to the win," Ferreira said after the 2019 competition. "Yeah, that was amazing."

In the Olympic final on Tuesday, Ferreira broke his board on the first ride when he landed violently in the whitewater. It was merely another bump in his Olympic journey as he secured a 15.14-6.60 win over Japan's Kanoa Igarashi.

The waters were choppy as a tropical storm rolls in and organizers forced the quarterfinals, semifinals and medal matches all into one day. The men's final was up first with Ferreira taking the first-ever surfing medal, and first male gold medal in the discipline. Team USA's Carissa Moore secured the first medal on the women's side with a pair of big runs.

It was the culmination of a wild ride to the Olympics for Ferreira. Maybe he will take a page out of Caeleb Dressel's book and do something nice for Toledo in acknowledgement of using his board to get there.

Italo Ferreira of Team Brazil.
Italo Ferreira of Team Brazil won the first gold medal awarded in surfing at an Olympic Games. (Ryan Pierse/Getty Images)

More from Yahoo Sports: