NELSON Cuevas and Jorge Campos came off the bench to drag Paraguay into the last 16 of the World Cup.

Cuevas scored twice, including the all-important final goal with six minutes left, and Campos added the other as Paraguay rallied past Group B foe Slovenia, 3-1.

In the other match on this final day of Group B play, Spain posted a 3-2 win over South Africa.

That result left Paraguay and South Africa with four points apiece and the same goal difference.

But the South Americans advanced to the last 16 by virtue of having scored one more goal than Bafana Bafana during group play.

Minus star midfielder Zlatko Zahovic, Slovenia took a 1-0 lead through Milenko Acimovic.

But Cuevas, who replaced Jose Carozo in the 61st minute, hit the equaliser after being on the field for just five minutes.

Then Campos cracked home a left-footed shot to put Paraguay in front, after coming on for Guido Alvarengo eight minutes into the second half.

Then Cuevas, whose dribbling skills mesmerized the Slovenian defense, cut across the box, moving past a pair of defenders, and launched a blast that hit the crossbar and bounced up into the roof of the net to make it 3-1.

Paraguay went down to ten men in the first half and then Slovenia had a men sent off in the second.

Paraguay will face Group E winner Germany in the second round.