(Reuters) - Spain will miss the men's Olympic handball event for the first time since the 1976 Games in Montreal despite beating hosts Sweden 25-23 in a qualifying tournament on Sunday.
The Spaniards, twice former world champions and triple Olympic bronze medalists, finished behind Slovenia and Sweden due to an inferior head-to-head record after all three teams claimed four points from three games.
Roared on by their fans in the Malmo Arena, Sweden clinched their berth and knocked out the Spaniards in the most dramatic fashion, scoring a penalty with five seconds left.
Slovenia, who stunned Spain 24-21 in the opening game, sealed qualification with a 33-17 rout of Iran.
Poland, Tunisia, Denmark and Croatia advanced to the Aug. 5-21 Games in Rio de Janeiro from the other two groups, joining Olympic champions France, Argentina, Qatar, Germany, Egypt and host nation Brazil.
(Writing by Zoran Milosavljevic; Editing by Tony Jimenez)