Cristiano Ronaldo's Portugal seized a World Cup lifeline with a dramatic stoppage-time equaliser to secure a 2-2 draw against the United States after highly-fancied Belgium booked a place in the last 16 on Sunday.
Belgium scored in the 88th minute of a pedestrian 1-0 win over Russia leaving Algeria to light up Group H by routing South Korea 4-2.
Portugal had looked on their way out of the tournament until the fifth minute of added time in the Group G clash when Ronaldo's curling cross from the right was met with an emphatic header by substitute Silvestre Varela past goalkeeper Tim Howard.
The Americans were seconds away from a last 16 place with goals from Jermaine Jones and Clint Dempsey turning things around after Nani's early strike for the Portuguese in steamy Manaus.
"When you concede in the last second it is unfortunate, but it was an amazing game from us, I can't ask for any more. Now we have to get a result against Germany and that is what we are going to do," said U.S. coach Juergen Klinsmann.
Germany and the U.S. have four points with Ghana and Portugal on one apiece going into the final games on Thursday. Germany take on the Americans in Recife with Ghana and Portugal meeting in Brasilia.
Belgium teenager Divock Origi became the youngest scorer so far at this tournament when he secured victory with a sharp shot into the roof of the Russia net from Eden Hazard's devastating run down the left and pinpoint cutback.
Algeria, who lost 2-1 to Belgium in their first match, tore the ramshackle Koreans apart, scoring the highest number of goals by an African team in a World Cup match.
It was the joint second-highest scoring match of the Brazil finals so far after France's 5-2 victory over Switzerland and equalled the Netherlands' 5-1 thumping of title holders Spain.
Islam Slimani and Rafik Halliche stunned the Koreans with two goals in two minutes and Abdelmoumene Djabou added a third to give Algeria a 3-0 lead at the interval.
They became the third team to score three first-half goals at this tournament after Germany in their 4-0 win over Portugal and France in their rout of the Swiss.
South Korea pulled one back through Son Heung-min, who turned to shoot between goalkeeper Rais Mbolhi's legs in the 50th minute.
Yacine Brahimi scored the goal that set the African record just after the hour and took the steam out of