Spain held onto their lead with a composed display
Spain's Fernando Echavarri and Anton Paz mastered the awkward conditions to take gold in the Tornado sailing event.
Echavarri and Paz went into the medal race with a three-point lead and they kept their rivals at arm's length.
Australia's Darren Bundock and Glenn Ashby had to settle for silver, while Argentina's Santiago Lange and Carlos Espinola claimed the bronze.
Britain's Leigh McMillan and Will Howden won the final race, but were back in sixth place overall.
The event saw the results from Wednesday's preliminary races used to decide qualification for the final medal race.
And with those results counting as part of the cumulative score, Britain's record left them too far down the standings to get into medal contention.
"Winning the medal race at the Olympics is always very nice, especially as it might be the last for the multihulls so we may have won the last ever multihull medal race at the Olympics," said McMillan.
"Obviously we came here to be in the medals and had a really good chance to achieve that so it was disappointing to finish outside.
"We had a really tough beginning to the week but came through at the end with some good, consistent results. Unfortunately the errors that we made early on were too damaging for us to get back into the medals."
Cannot play media. Sorry, this media is not available in your territory.
Video - Spain sail to Tornado gold
Canada and the Netherlands crossed the finish line in second and third place on Thursday, with Spain, Australia and Argentina - in that order - the next three boats to finish.
Winds of up to 30km/h and choppy seas at the Qingdao Sailing Centre made life difficult for all the teams on the water, but Spain held their performance together under pressure to spark huge celebrations with their supporters.