Match ends, South Korea 2, Algeria 4.
Algeria moved up to second in World Cup Group H as they overcame South Korea in a six-goal thriller in Porto Alegre.
Islam Slimani ran onto a long ball to flick in the first and a Rafick Halliche header put Algeria 2-0 up.
Abdelmoumene Djabou sidefooted in a third, before Song Heung-min's low shot pulled one back as South Korea rallied.
Yacine Brahimi added Algeria's fourth and, despite Koo Ja-cheol scoring a second for Korea, Algeria held on for their first World Cup win since 1982.
Algeria, narrowly beaten by group leaders Belgium in their opening game, knew a second defeat would end their hopes of getting out of the group stage for the first time. They responded in emphatic fashion, becoming the first African team to score four goals in a World Cup game.
A win for the Desert Foxes against Russia will now secure a last-16 spot, and a draw could be enough if South Korea fail to beat Belgium.
Algeria coach Vahid Halilhodzic made five changes from the opening defeat by Belgium and his reshuffle had the desired impact.
Sofiane Feghouli had a strong shout for a penalty turned down when he appeared to have been tripped by Kim Young-gwon before the ball fell for Brahimi to hook over.
Slimani then found space at the far post only to head wide and also badly mistimed a first-time shot from six yards as he met an inviting cross from Aissa Mandi.
But the Portugal-based striker, who was his side's top scorer in qualifying, did not take long to atone as he outpaced two defenders to get to a long Carl Medjani pass and flick the ball past on-rushing keeper Jung Sung-ryong.
Defender Halliche extended the lead two minutes later with his second goal for his country, a thumping header from an Djabou corner.
And Djabou turned from provider to goalscorer when Slimani slipped a ball across for him to sidefoot home.
South Korea had not managed a shot on target in the first half but pulled a goal back shortly after the break - a mistake from Madjid Bougherra allowing Song to send a shot through the legs of keeper Rais Mbohli.
It was now Algeria's turn to be penned back and they survived a further scare when Ki Sung-yueng had a long range shot palmed over by Mbohli.
However, Brahimi restored his side's three-goal advantage when he played a one-two with Feghouli before slotting past Jung.
But a much-improved South Korea were not finished, and after the Desert Foxes failed to clear their lines, Lee Keun-ho played the ball across the box for Koo to slot in, before a tiring Algeria managed to regroup and close out the win.
Algeria coach Vahid Halilhodzic:
"We played an almost perfect first period.
"We played very well, very effectively and then it went down a little bit - maybe it was psychological, maybe it was physical - we will have to talk about this.
"But I think that this was a real feat this afternoon and I would like to congratulate my players."
South Korea coach Hong Myung-bo:
"In the stadium, there were a lot of Korean fans and I would like to apologise to them.
"We have one game left and I would just like to promise that we will do our best for the next match."
- 12Lee YongBooked at 54mins
- 16Ki Sung-yueng
- 5Kim Young-Gwon
- 17LeeSubstituted forLeeat 64'minutes
- 14HanBooked at 69minsSubstituted forJiat 78'minutes
- 10ParkSubstituted forKim Shin-Wookat 57'minutes
- 13Koo Ja-Cheol
- 9Son Heung-Min
- 18Kim Shin-Wook
- 21Kim Seung-gyu
- 22Park Joo-Ho
- 2BougherraBooked at 67minsSubstituted forBelkalemat 89'minutes
- 11BrahimiSubstituted forLacenat 77'minutes
- 18DjabouSubstituted forGhilasat 73'minutes
- Wilmar Roldán
- Shots on Target
Second Half ends, South Korea 2, Algeria 4.
Foul by Ji Dong-Won (South Korea).
Aissa Mandi (Algeria) wins a free kick on the right wing.
Corner, South Korea. Conceded by Essaïd Belkalem.
Foul by Ji Dong-Won (South Korea).
Carl Medjani (Algeria) wins a free kick in the attacking half.
Substitution, Algeria. Essaïd Belkalem replaces Madjid Bougherra.
Attempt missed. Ji Dong-Won (South Korea) left footed shot from the left side of the box misses to the right. Assisted by Kim Shin-Wook with a headed pass.
Attempt blocked. Son Heung-Min (South Korea) right footed shot from outside the box is blocked.
Kim Shin-Wook (South Korea) wins a free kick in the attacking half.
Foul by Carl Medjani (Algeria).
Attempt missed. Lee Keun-Ho (South Korea) right footed shot from the right side of the box is too high.
Delay over. They are ready to continue.
Delay in match Islam Slimani (Algeria) because of an injury.
Foul by Nabil Bentaleb (Algeria).
Koo Ja-Cheol (South Korea) wins a free kick in the defensive half.
Corner, South Korea. Conceded by Nabil Ghilas.
Lee Keun-Ho (South Korea) wins a free kick on the right wing.
Foul by Mehdi Lacen (Algeria).