Slovenia held group leaders Sweden to a 28-28 draw at the World Men’s Handball Championship in Egypt thanks to a last-gasp goal from Matej Gaber.
Just one second remained when Gaber scored, condemning Sweden to a second draw in a row.
"We fought back and showed character in this match," Slovenia coach Ljubomir Vranjes said.
"I kept telling the players to believe in ourselves and reminded that the game lasts 60 minutes."
Vranjes is Swedish and was a member the side that won the World Championship in 1999 when it was last hosted by Egypt.
While the Swedes remain top of Group IV this year, they are now level on points with hosts Egypt with one game left.
Egypt beat Belarus 35-26, with Ahmed El Ahmar scoring eight times.
Belarus have been eliminated with the loss.
The Russian Handball Federation team beat North Macedonia in the group's other match to keep their qualification hopes alive.
The Russian Handball Federation and Slovenia each have five points, while Egypt and Sweden have six; the top two will advance to the quarter-finals.
Slovenia face Egypt and the Russian Handball Federation play Sweden in the final set of games, all knowing a will would most likely see them through.
In Group III, France maintained their 100 per cent record with a 28-26 win over Iceland, and top the group on eight points.
Norway, thanks to a 36-23 triumph over Algeria, are second, two points behind.
The Portuguese team beat Switzerland and are level on points with Norway, but have a worse head-to-head record.
If they can beat France in their last game, Portugal will advance, but defeat will see them knocked out.
Group I and Group II are in action tomorrow at the International Handball Federation's marquee tournament.