Henri Camara scored only the second golden goal winner in World Cup history to earn Senegal a quarter-final World Cup place, after being held 1-1 by Sweden at the end of normal time on Sunday.
Sweden took the lead through Henrik Larsson's 11th-minute header only for World Cup debutants Senegal, who stunned holders France 1-0 in the opening game of the tournament, to equalise through Camara eight minutes before half-time.
Camara then struck his second 104 minutes into the match with a low drive into the bottom left-hand corner of the net off the post.
The only previous occasion when a World Cup tie was settled by a golden goal was four years ago when France beat Paraguay 1-0 in the second round, with central Laurent Blanc grabbing the all-important strike on the way to their eventual title win.
Senegal had been aiming to become only the second African nation, after Cameroon in 1990, to reach the last eight.
The winners will now play Japan or Turkey in the quarter-finals.
Lars Lagerback's Sweden had come through a desperately difficult group F involving England and Argentina undefeated and went ahead when prolific striker Larsson headed home an Anders Svensson corner.
It was the Swede's 24th goal in 72 internationals but after that the 1994 semi-finalists lost their early momentum.
Senegal, Africa's only representatives in the last 16, deservedly equalised eight minutes before the interval.
Camara sidestepped Johan Mjallby's challenge and drilled the ball low into the bottom corner to send the rhythmic rattle of the drummers among Senegal's fans into ecstatic overdrive in the sweltering conditions at the Big Eye stadium in western Japan.
Senegal also had a Pape Boupa Diop effort ruled out by a tight offside decision as Sweden, without injured midfielder Fredrik Ljungberg who failed a late fitness test, visibly wilted in the heat as the first half wore on.
Sweden improved at the start of the second period and both Marcus Allback and Anders Svensson threatening to restore their advantage.
Substitute Andreas Andersson also fired wastefully over for the Swedes after a good link up with Larsson, while Senegal's impressive El Hadji Diouf tested Sweden goalkeeper Magnus Hedman with a curling free kick.
With 10 minutes to go, Sweden substitute Zlatan Ibrahimovic looked likely to break the deadlock, cutting inside two defenders and unleashing a powerful shot which was well saved.
But with so much at stake and the hot conditions making it slow going for both sides, neither goalkeeper was overly bothered and golden goal extra time became inevitable.
Ibrahimovic again had the chance to settle it in extra time but keeper Tony Sylva saved bravely as the Swedes began the brighter.
Svensson then rattled the post after a magnificent turn with a powerful drive as Senegal rode their luck again.