KAZAN, Russia (AP) — Sun Yang of China has won the first gold medal of pool swimming at the world championships in Russia.

The current Olympic champion won the men's 400-meter freestyle in 3 minutes, 42.58 seconds on Sunday night, his third consecutive world title in the event.

Sun is coming back following a three-month doping ban last year after testing positive for a banned stimulant.

James Guy of Britain was under world-record pace through the first half of the race, but Sun pulled slightly ahead approaching the 350-meter wall. Sun built a bigger lead over the final lap to clinch the victory. He sat on the lane line and clenched both fists in celebration.

Guy won the silver medal in 3:43.75 and Ryan Cochrane of Canada took the bronze in 3:44.59.

The men's 400 free is the first of four finals Sunday night.