Samoa have failed to qualify for the men's Olympic sevens competition after conceding a try on the full-time siren to lose 22-19 against Spain in the final of the repechage event in Monaco.
The Manu, who entered the tournament as top seeds, trailed 12-0 midway through the first half but hit back in the with tries to Alex Samoa and Alex Fidow to lead 14-12 at halftime.
Samoa streched their lead to seven points when Belgium Tuatagaloa crossed early in the second half.
Spain closed the gap to 19-17 with three minutes remaining to ensure a tight finish and clinched their Olympic berth in the dramatic fashion, with Ignacio Martin crossing the line as time expired to break Samoan hearts.
An emotional Spain captain Pablo Feijoo was overwhelmed at their achievement.
"It's so crazy. These lads work the entire year for this tournament and we get in the last position (for the Olympics) it's amazing. They played with the heart - I can't believe it. It's a dream for us - we've been working, some of us, fifteen years for this. Many people in Spain believed in us and we just keep working these guys - it's tough - have trust in us and this is the result of a dream."
Samoa had earlier beaten Hong Kong 31-12 in the quarter finals and Germany 24-14 in the semis to progress to the final.
Tonga finished tenth at the repechage event after losing to Zimbabwe 31-5 in the Challenge Trophy final.
The Kingdom failed to win any of their pool games against Samoa, Zimbabwe and Ireland but thrashed South Korea 41-7 and Uruguay 35-12 in the Challenge Trophy quarter and semi finals.
Meanwhile the final women's Olympic berth will be decided this weekend in Dublin, with Samoa and Cook Islands among 16 teams vying for a place in Rio.
The Manusina continued their preparation with two victories over the Yorkshire Women's team in Leeds.