Uruguay progressed to the round of 16 as Diego Godin's late goal secured a 1-0 victory over 10-man Italy -- but Luis Suarez could face a ban after appearing to bite Giorgio Chiellini on the shoulder.
The Azzurri went into the match ahead of their Group D opponents on goal difference alone and the circumstances made for a cagey first half, with Uruguay -- in desperate need of the victory -- struggling to carve out chances.
Italy goalkeeper Gianluigi Buffon was forced to make a double save from Luis Suarez and Nicolas Lodeiro, but otherwise the main incident of note in the first 45 minutes was a Mario Balotelli caution that triggered an automatic one-match suspension.
However, Uruguay's prospects were boosted in the second half as Claudio Marchisio received a straight red card for a dangerous challenge on Egidio Arevalo.
Uruguay might have gone down to 10 men themselves as Suarez appeared to bite Italy defender Chiellini on the shoulder, but the referee took no action, and moments later Godin headed home substitute Gaston Ramirez's corner to give his side victory.
However, La Celeste had to settle for second place as Costa Rica advanced as group winners following a 0-0 draw with England.
- Mitten: Young England fail again
The Three Lions went into the game on the back of defeats to Italy and Uruguay that had seen them exit the tournament in record time, but Los Ticos' progress was already assured after their surprise victories over those opponents.
England, fielding a much-changed starting XI, enjoyed the better of the opening 45 minutes, with Daniel Sturridge going close on several occasions as well as seeing a penalty appeal turned down.
However, it was Costa Rica who came closest to breaking the deadlock when Celso Borges saw his 25-yard free kick tipped onto the crossbar by Ben Foster.
Roy Hodgson's men continued to press in the second half, and Sturridge sent another chance just wide of the post, but they could not force a goal and the match ended in a draw.
Costa Rica will play Greece in the round of 16 after Georgios Samaras' injury-time penalty secured a 2-1 victory over Ivory Coast.
The Greeks had exited at the group stage at the 1994 and 2010 tournaments, and looked set for another early exit against an Ivorian team that had been second in the group prior to the match.
But Greece -- who had yet to score in the tournament -- finally demonstrated their goal threat in their final group match. Jose Holebas crashed a shot against the crossbar before, on 42 minutes, Greece capitalised on some loose play as Andreas Samaris played a one-two with Georgios Samaras before finding the net.
Midway through the second half, Greece again rattled the woodwork as Giorgos Karagounis hit the bar, but five minutes later Ivory Coast drew level when Gervinho squared for Wilfried Bony to drill home.
That had looked set to see the Ivorians through until Giovanni Sio brought down Samaras in the area and the striker converted the penalty.
Colombia will play Uruguay in the next round as a 4-1 victory over Japan saw them finish top of Group C.
Colombia went ahead after 17 minutes when Adrian Ramos was brought down by Yasuyuki Konno in the area and Juan Cuadrado stepped up to convert the penalty.
However, Japan fought back and Keisuke Honda, who had earlier sent a free kick just wide of the post, clipped over a cross for Shinji Okazaki to superbly head into the corner of the net.
Within 10 minutes of the restart, Colombia had restored their advantage, as Jackson Martinez rounded off a slick move by drilling James Rodriguez's layoff past Eiji Kawashima in the Japan goal.
On 64 minutes, Honda brought a save from David Ospina with a free kick from distance, and a minute later Yoshito Okubo sidefooted over the bar from close range.
However, on 82 minutes, Martinez ended Japan's hopes of securing second place in the group as he received the ball in the area before turning and curling beyond Kawashima. Rodriguez then added gloss to the scoreline when chipping in a fourth in the dying moments.