RIO DE JANEIRO (AP) — Aleksander Lesun had four years to get over his disappointment in London, four years to prepare for his next opportunity.

When it came, he was ready.

No missed shots. No missed medals. Only gold.

Calm and collected on a stage he had once failed on before, Lesun captured gold in men's modern pentathlon at the Rio de Janeiro Games on Saturday for his first Olympic medal.

Pavlo Tymoschenko of Ukraine earned silver and Ismael Hernandez Uscanga bronze for Mexico's first modern pentathlon medal.

"I really upset (about London), but I tried to be calm and do the same thing," said Lesun, who won Russia's fourth modern pentathlon gold in the past five Olympics.

Lesun has been one of the most consistent pentathletes in the world.

The 28-year-old who was born in Belarus and now lives Moscow won world titles in 2012 and 2014, never finishing worse than third in seven world championships. He also came to Rio as the world record holder in overall points (1,534) and fencing (586).

The glaring omission on Lesun's resume was an Olympic medal. He was in position for one at the 2012 London Games, entering the final round in third place, but needed 10 shots to hit five targets and fell to fourth.

Lesun and Tymoschenko were the favorites heading into the Rio Games and lived up to expectations.

Lesun set an Olympic record in the opening fencing with 268 points, finished 22nd in swimming and had a 23-point lead after the one-touch fencing bonus round. He maintained his lead after the equestrian event and stayed through the final event, a combination of running and shooting.

Despite Tymoschenko charging through the field, Lesun was far enough ahead that he could miss 10 shots in the final event. With Tymoschenko well behind, Lesun waved to the crowd about 30 yards from the finish line and collapsed to the ground shortly after taking the tape.

"I did my job," Lesun said.

Tymoschenko made a huge jump to the medal stand. The 29-year-old from Kiev is the reigning world champion and ran like it in Rio, moving up from eighth to second in the running/shooting combination for his country's second Olympic medal in modern pentathlon.

"I came here not just participate, I came here for a medal," Tymoschenko said. "There was some pressure, but last year I had my biggest achievement winning the world championship, so it was OK here in the Olympic Games."

Hernandez Uscanga moved up to sixth after a clean equestrian ride and made up ground in the final event, edging France's Valetin Prades by a second to capture the bronze medal.