Canada's Ryan Cochrane, left, China's China's Zhang Lin, centre, and Oussama Mellouli of Tunisia show off their medals from the men's 800-metre freestyle race in Rome. ((Pier Paolo Cito/Associated Press))

Canada's medal drought in the pool has ended.

Victoria swimmer Ryan Cochrane won a bronze medal in the men's 800-metre freestyle event at the world aquatics championships in Rome on Wednesday.

An Olympic bronze medallist in the 1,500 freestyle at last year's Beijing Olympics, Cochrane raced to bronze in seven minutes 41.92 seconds.

China's Zhang Lin won with a world-record effort, capturing gold in a time of 7:32.12 to break Aussie Grant Hackett's four-year-old mark.

Tunisian swimmer Oussama Mellouli earned the silver at 7:35.27.

Like he did in the 1,500 freestyle in Beijing, Cochrane got off to a good start and maintained a strong pace throughout the race on Wednesday. The 20-year-old swimmer had no problems outdistancing Italian Federico Colbertaldo, who finished in 7:43.84.

"I'm ecstatic with the time, happy with the medal," Cochrane told CBC Sports. "I wanted to be a little higher, but it was an amazing competition. I'm just happy to be part of it."

Entering the meet, Cochrane had planned to swim only the 400 metres and the 1,500. He decided to enter the 800 after finishing seventh in Monday's 400.

"I hated being seventh," said Cochrane. "It was a learning experience.

"I  had to get back to what I needed to do to get back on the podium. We decided to swim the 800 to get me mentally prepared for the 1,500. I felt the 800 would warm me up well for that."

The Canadian now turns his attention to the 1,500 event set for Sunday, the final day of competition. A surprise bonze medallist in Beijing, Cochrane has his eye on the top of the podium this time around.

A pair of other Canadians advanced to the finals of their respective events.

Mission, B.C., native and defending world champion Brent Hayden qualified fifth in the men's 100 freestyle in a time of 47.88 seconds.

Montreal's Audrey Lacroix, meanwhile, just snuck into the women's 200 butterfly, grabbing the eighth and final spot in 2:06.85.

With files from The Canadian Press