Spain pipped Japan to the top of the medal podium in the Aloha Cup at the 2018 International Surfing Association (ISA) World Surfing Games in Tahara in Japan.
Crowd favourites Japan finished just 0.26 points behind Spain for the silver medal, with Costa Rica getting the bronze and the United States copper.
The gold medal is Spain’s first in the event.
Gony Zubizarreta of Spain got 6.27 points in the final, the highest score in his team.
"It feels amazing to win gold," he said.
"This is Spain’s first ISA Aloha Cup gold, and this definitely was the most fun part of the event.
"Competing with all the team, running, and all the stress make it super exciting.
"We got off to a slow start, but then Leticia Canales picked up the slack and got three really good waves.
Zubizarreta added: "We needed a wave in the last minute and we got in with a few seconds remaining.
"It was amazing.”
The ISA Aloha Cup is a team relay event featuring the top eight teams from the previous edition of the ISA World Surfing Games.
These teams were divided into two groups, with France, Mexico, Japan, and Costa Rica in one and Portugal, Spain, Peru, and the US in the other.
There were four members to a team, with three waves to an athlete.
The three scores from each athlete gave the overall team score.
The competition is due to resume on Saturday (September 22) when the women’s event and overall team rankings will be decided.