American Giles Smith took the men’s 100 butterfly posting a time of 52.04, breaking Brazilian Kalo De Almeida‘s Pan American Games record of 52.05, which he set in 2007.

Smith and Santiago Grassi of Argentina had an incredible battle for the gold finishing only five one-hundredths of a second apart. Grassi took the first 50 meters out in a time of 24.35 followed closely by Smith who turned in a time of 24.49.

Despite having a turn and finish that could use some refinement, Smith out swam Grassi by 19 one-hundredths of a second on the final 50 meters.

Smith was just off his lifetime best time of 52.02, which he posted at the 2014 US Summer National Championships.