Spain won, 1-0, to move into the semifinals and it extended its streaks to 14 straight wins -- equaling the record held by Australia, Brazil and France -- and 34 games without a defeat -- one short of the world record of 35 held by Brazil.
Iraq coach Bora Milutinovic could also claim personal victory, saying he was delighted Iraq held the heavily favored Spaniards to one goal -- a feat that should impress teams looking for an emergency coach at World Cup, where he has already taken five different teams.
David Villa's goal made him Spain's second highest career scorer with 30 goals-14 behind Raul's record of 44.
In contrast to the opener against New Zealand when the Spaniards had three goals within a half an hour, they needed almost an hour to score against Iraq, which featured six defenders and a defensive midfielder as its lone striker.
In Wednesday's other game, Bernard Parker scored twice in a 2-0 win over New Zealand.
June 17 in Bloemfontein
Spain 1 Iraq 0. Goal: David Villa 55
Spain -- Casillas, Sergio Ramos, Pique, Marchena, Capdevila, Santi Cazorla (David Silva 67), Mata, Xavi (Sergio Busquets 82), Xabi Alonso, David Villa (Guiza 75), Fernando Torres.
Iraq -- Kassid, Abbas, Shaker, Rehema, Majeed, Ali Kareem, Khalid, H.M. Mohammed (Jassim 69), Akram, Saeed (Kareem 60), Zahra (Mahmoud 81).
Referee: Matthew Breeze (Australia).
June 17 in Rustenburg
South Africa 2 New Zealand 0. Goals: Parker 21, 52
South Africa -- Khune, Gaxa, Masilela, Mokoena, Booth, Sibaya, Dikgacoi, Pienaar, Modise, Parker (Tshabalala 81),Fanteni (Mashego 61).
New Zealand -- Moss, Lochhead, Vicelich, Boyens, Mulligan, Elliott, Brown (Oughton 55), Bertos (James 66), Christie, Smeltz, Killen (Wood 75).
Referee: Benito Archundia (Mexico).