Britain's Sarah Ayton and Sarah Webb pipped former Olympic team-mate Shirley Robertson to gold in the Yngling class at the World Sailing Championships.
Ayton (left) and Webb (right) won Yngling gold with Robertson in Athens
Ayton and Webb, sailing with Pippa Wilson, took the title with the final race in Portugal to seize pole position in the campaign for Olympic selection.
Robertson, who won gold with Ayton and Webb in Athens, was second overnight but slipped to bronze on the last leg.
Only one British boat in each class will be selected for the Beijing Games.
Ayton's team finished sixth in the final race in Cascais to edge out Sally Barkow's American crew by one point.
They had a nervous moment when Wilson fell into the water when the boat was heading into the windward mark for the second time.
The boat came close to being disqualified as they tried to haul Wilson back on board but they survived that scare to emerge victorious.
"We've been working so hard for this ever since I became a helm and especially since Pippa joined our team at the end of the last year," said Ayton.
"Preparing for the event, we knew it would be a windy venue, which are the conditions that Shirley is strong in, so we knew there was the chance that it could have come down to who beat who in the medal race.
I am committed to continuing our Olympic campaign for Beijing
"Our goal was to win the start, we did that and managed to hold on."
Robertson, who also won Olympic gold in the single-handed Europe class in Sydney 2000, was forced into a penalty on the final downwind leg and finished ninth, leaving her seven points adrift.
"This was only the third medal race I have competed in since the new format was introduced two years ago," she said.
"We've come a long way in a short space of time. Who would have thought we would be battling it out for the gold medal here against teams who have been together for the last three years?
"I felt we sailed a really good regatta this week, but our execution of the medal race wasn't good enough.
"I am committed to continuing our Olympic campaign for Beijing, if the RYA selectors think it'll benefit Team GBR's chances of winning another gold medal in the Yngling class, we want to continue.
"In some ways we feel this should really be the beginning not the end. For now we will have to sit back and wait."
Britain's Ed Wright went into the Finn medal race in fourth place with seven sailors in with a chance of a medal.
But Wright finished eighth place to end the regatta in sixth place overall.
Olympic Finn champion Ben Ainslie was unable to compete because of America's Cup commitments.