(Reuters) - Alistair and Jonny Brownlee were brothers in arms at a dramatic finale of the World Triathlon Series as double Olympic champion Alistair hauled an exhausted Jonny over the line in a desperate bid to help his younger brother secure the title.

Jonny, silver medalist in Rio, collapsed having finished second but Spaniard Mario Mola's fifth-placed finish in the final race of the series in the Cozumel, Mexico was enough for the Spaniard to top the overall standings and secure his first ITU world championship title, four points ahead of Briton Jonny. Spain's Fernando Alarza came third.

But Mola's overall victory played second fiddle to the show put on by the Brownlee brothers.

Heading into the final race of the season, victory would have handed Jonny the world title and with just under a kilometer to go of the run, victory was firmly in his grasp as he led by 50 meters.

But dazed by the heat and reeling from exhaustion, the Rio Olympics silver medalist began to wander across the road, allowing South Africa's Henri Shoeman to overtake him in the final stretch of the 10km run to win on the day.

Alistair, who was running in third-place, caught hold of his disoriented brother, wrapping an arm around his shoulder to take his weight over the final few meters, before pushing Jonny over the finish line ahead of himself.

"I wish the flipping idiot had paced it right and crossed the finish line first," Alistair told reporters after the race as Jonny was given medical treatment.

"He could have jogged that last two kilometers and won the race. You have to race the conditions. It was a natural human reaction to my brother but for anyone I would have done the same thing. I think it's as close to death as you can be in sport."

Mola said his joy in victory had been tempered by Jonny's struggles with the conditions.

"First of all this was not how I wanted to win the world championship," the Spaniard said in a statement.

"Luckily I was able to be in the top five considering Jonny didn't win the race. We want everyone to be safe after the finish line, it's not the way I wanted it, but that's triathlon."

After the 1.5km swim, the Brownlee brothers were in the leading pack that headed into the second transition one minute 39 seconds ahead.

Jonny, 26, set the pace heading into the final run, but Schoeman stayed in touch, eventually capitalizing on the Briton's exhaustion to clinch his first world triathlon series win.

An appeal by the Spanish Triathlon Federation to disqualify Jonny for accepting assistance from his brother was dismissed by the ITU jury.

Bermuda's Flora Duffy was crowned the women's world triathlon series champion ahead of American Olympic champion Gwen Jorgensen on Saturday.

Duffy broke away from the pack with a stellar bike ride, and maintained her momentum in the run to clinch victory.

Japan's Ai Ueda finished third in the overall standings.

(Reporting by Nivedita Shankar in Bengaluru. editing by Mitch Phillips)