Uruguay survived when Ghana missed a penalty kick at the very end of extra time, then won the shootout 4-2 after a 1-1 draw in their World Cup quarterfinal Friday. The wild win sent the South Americans into the semifinals for the first time in 40 years. It sent the final African team home in tears.

Sebastian Abreu chipped in his penalty kick to give Uruguay a spot opposite the Netherlands in the final four.

Ghana missed twice in the shootout, but wouldn’t have been there had Asamoah Gyan, who made two penalty kicks earlier in the tournament, not hit the crossbar on the final play of overtime.

So Uruguay, once a soccer power, most recently an afterthought, travels to Cape Town for Tuesday’s semifinal. The last nation to make the tournament, it needed a playoff against Costa Rica just to get in. Now it is one step from the title match.

“To be among the four best (teams) in the world, there are no words for that,” star striker Diego Forlan said. “We felt we were going to faint with each penalty.”

Ghana carried the weight of an entire continent’s soccer hopes — the other five African nations did not advance — and became the third African team to exit in the quarterfinals of a World Cup. The Black Stars couldn’t replicate the opportunism they used to beat the United States in extra time six days ago.

Uruguay won the first World Cup in 1930, then again in 1950, beating Brazil in Rio de Janeiro.

That scene couldn’t have been any more difficult for the Celeste than the atmosphere at Soccer City. The vuvuzela-blowing, flag-waving capacity crowd cheered the Black Stars as if they were South Africa’s Bafana Bafana. Nelson Mandela himself praised the Black Stars earlier Friday, and Sulley Muntari, known more for his bad attitude than his good play, gave Ghana the lead in the final seconds of the first half.

But even with Brazil’s loss to the Dutch earlier Friday, this has been South America’s tournament. Forlan tied it with a swirling free kick early in the second half, and penalty kicks won it for Uruguay.

And lost it for Ghana.

As extra time ticked down, a scramble in front of the Uruguay net caught goalkeeper Fernando Muslera out of position. Dominic Adiyiah’s header was cleared off the goal line by Luis Suarez — using his arm. That drew an immediate red card for the striker, who will miss the semifinal, and sent Gyan to the penalty spot.

With the noise seemingly at a supersonic level, Gyan calmly eyed Muslera, then struck the ball off the crossbar.

Gyan stumbled away holding his head as the whistle sounded, sending the match to penalty kicks and the crowd into stunned silence.

But only momentarily. The fans, except for the small pockets of blue-clad Uruguay supporters in the crowd of 84,017, booed Forlan before he calmly sent the first kick past Richard Kingson.

And who would step up first for Ghana but Gyan — and he also struck the ball perfectly. Had he done so minutes earlier, Ghana and all of Africa would be celebrating an historic achievement.

Instead, the shootout moved to 3-2 for Uruguay when Muslera guessed correctly, diving left for an easy save on John Mensah. After Maximiliano Pereira’s kick skied over the net, the vuvuzelas were at their loudest.

But Muslera also stopped Adiyiah, and Abreu won it. As his teammates sprinted to smother him in an ecstatic scrum, several Ghanaians slumped to the field.