European champion Spain set a world record of 15 successive international wins by beating South Africa 2-0 in the Confederations Cup on Saturday. David Villa's goal seven minutes into the second half and another 20 minutes later from substitute Fernando Llorente also meant Spain equalled Brazil's run of 35 matches without defeat. Runner-up South Africa joined Group A winner Spain in the semifinals after Iraq drew 0-0 with New Zealand in Johannesburg, the home players waiting anxiously in a huddle on the pitch before discovering their fate. Villa's goal was a masterclass in control and finishing as he chested down a chip from Alvaro Arbeloa before turning and shooting wide of Itumeleng Khune. The 21-year-old keeper had brought the 38,212 crowd to its feet less than a minute earlier, stopping the Valencia player's penalty and a follow-up shot from Carles Puyol. The kick had been awarded after Villa was brought down by South Africa captain Aaron Mokoena. Villa and strike partner Fernando Torres were replaced immediately after the first goal as coach Vicente del Bosque gave opportunities to Pablo Hernandez and Llorente. Llorente swept in the second goal after a miscue from Cesc Fabregas fell perfectly in his path, enabling Spain to break the previous record for successive international victories jointly held by Brazil, France and Australia. South Africa toiled hard but was no match for Spain, who coasted after the second goal. Spain remains in Bloemfontein for Wednesday's semifinal against the runner-up in Group B while South Africa plays in Johannesburg on Thursday.