Updated

Ben Ainslie edged Denmark's Jonas Hogh- Christensen in the Finn class medal race Sunday, a result that gave him the gold medal and made him the most successful sailor in Olympic history.

Ainslie earned his fourth consecutive gold medal and fifth overall. He had taken silver at the 1996 Atlanta Games before going on his run of titles.

Sunday's victory moved him past Dane Paul Elvstrom, who won four straight golds from 1948-60.

Ainslie was second to Hogh-Christensen after the opening series of 10 races, by just two points. It was a tight margin, especially because points in the medal race are doubled -- 2 for first place, 4 for second place and so on -- then added to the total from the opening series. The sailor with the fewest amount of points wins.

Ainslie needed to finish ahead of Hogh-Christensen on Sunday and did so despite finishing ninth. The Dane came in 10th, last in the field. Both had 46 points, but Ainslie got the gold because he had a better finish in the medal round.

Hogh-Christensen took silver, while France's Jonathan Lobert earned bronze after winning the medal race.

"It's a risky game, but it paid off for Ben," said Hogh-Christensen.

While Ainslie again pulled out the gold in the heavyweight dinghy class, the British men's Star (keelboat) duo of Andrew Simpson and Iain Percy didn't capitalize on a strong chance to win their class.

They held an eight-point lead heading into the medal race, but finished eighth.

That tacked 16 points onto their overall score, for a total of 34. It also provided enough of a window of opportunity for Sweden's Fredrik Loof and Max Salminen to grab the gold medal. They won Sunday's race and finished with 32 points.

Percy and Simpson ended with silver, while Brazil's Robert Scheidt and Bruno Prada took bronze.

"You are never guaranteed anything with the wind being so puffy," Simpson said. "We are very frustrated right now, but proud."

The U.S. tandem of Mark Mendelblatt and Brian Fatih finished seventh.

In non-medal sailing events Sunday, Australians Nathan Outteridge and Iain Jensen won twice to stay in first in the men's 49er (skiff) competition. There are two opening-series races remaining in that class.

Spain's Marina Alabau Neira placed in the top-six twice in women's RS:X (windsurfer), and holds first place heading into the medal race.

The Netherlands' Dorian van Rijsselberge did not finish one of Sunday's races in men's RS:X, but because the worst performance is discarded in the opening series of fleet racing, he stayed in first moving into the medal competition. He has finished in the top three in every other race.

Both RS:X medal races are Tuesday.

In women's 470 (two-person dinghy), Great Britain's Hannah Mills and Saskia Clark lead after six races.