Tunisia's Ahmed Hafnaoui surprised everybody, including himself, after winning the 400m freestyle gold on Sunday and producing<b> </b>the first<b> </b>major upset of the Tokyo Games so far. The 18-year-old swimmer had kept pace with Jack McLoughlin, who held the lead for much of the race, before Hafnaoui surged in the final 50m to claim gold. Upon seeing the results, Hafnaoui was overjoyed. He roared and punched the water as he lapped up the applause of the reduced crowd in the Tokyo Aquatics Centre. Kieran Smith from the US took bronze, about a half-second behind Hafnaoui. The result was completely unexpected. Hafnoui had only just made it into the final with the eighth fastest qualifying time, finishing two seconds behind the heats winner. His gold-winning time of 3:43.36 was 2.32 faster than his swim in the heats. "I just can't believe it, it's amazing. I felt better in the water this morning than yesterday and that's it. I'm the Olympic champion now," he said. When asked if he was surprised by the result, he said: “Of course, it’s unbelievable. I didn’t believe it until I touched the wall and saw my face first. I saw the Australian guy from lane six, I guess in the 200m. It was a great fight at the end. I’m feeling great. I am feeling proud.” In qualifying for the final Hafnaoui was only the second ever Tunisian to do so in Olympic swimming history. His gold medal is only the third ever won by Tunisia in the pool and the country's fifth Olympic gold in all sports. "I just put my head in the water and that's it. I just can't believe it. It's a dream come true." In qualifying for the final, Hafnaoui was only the second Tunisian to do so in Olympic swimming. His gold medal is just the third won by Tunisia in the pool and the country's fifth Olympic gold in all sports. Having collected his medal, Hafnaoui was overcome with emotion during the podium ceremony. "I was in tears when I saw the flag of my country being raised and I heard the anthem," he said. "I felt so proud." Hafnaoui started swimming in Tunisia aged six when his father Mohamed, a former member of the national basketball team, enrolled him in a local club. He joined Tunisia's national swimming programme when he was 12 years old. Prior to Sunday’s win, Hafnaoui was improving but nonetheless still very much a medal outsider. He competed in the 200m, 400m and 800m freestyle at the 2018 Youth Olympic Games in Buenos Aires, finishing eighth in the 400m and seventh in the 800m. He dedicated his Olympic gold medal to his family and to building on the legacy of the Tunisia's first Olympic swimming champion Oussamma Mellouli. Mellouli, who is due to compete in the 10k swim on August 5, was the first Tunisian swimmer to win an individual gold medal in the Olympics. The two-time gold medalist has said Tokyo will be his last Games, leaving Hafnaoui to continue the legacy of Tunisian swimming. "I have a great relationship with Mellouli - he wished me luck before the race, and I guess I wish him luck in 10k in the open water," Hafnaoui said after the final. "He is a legend - I wish to be like him one day." Hafnaoui now has a day’s rest to enjoy his victory, before returning to the pool on Tuesday to swim in the men’s 800m freestyle, where he will undoubtedly be less of an outsider. Asked what his message was, the teenager said: "I dedicate this to all the Tunisian people. You have a champ now. I'm so happy to have a gold medal, just be proud of me, and that's all." The north African nation has now won a total of five gold medals at the Olympic Games. In addition to Hafnaoui and Mellouli, runner Mohammed Gammoudi won gold in the 5000m at Mexico City 1968, while 3000m steeplechase runner Habiba Ghribi won at London 2012.