The world and European champions raced into a two-goal lead in the Group B clash thanks to goals from Pedro and Roberto Soldado in a dominant first-half performance.
However, they were unable to extend their advantage after the interval and Liverpool striker Luis Suarez pulled a goal back for the South Americans with a curling free-kick in the 88th minute.
Spain, who are trying to win the only major trophy they do not currently possess, took command from the start and totally controlled the game in the early stages with Uruguay hardly getting a touch.
Soldado was inches away from connecting with Jordi Alba's cross and Cesc Fabregas hit the base of the post as he was denied a brilliant goal.
Spain finally broke the deadlock in the 20th minute but there was an element of good fortune about Pedro's goal when his rising shot deflected in off defender Diego Lugano after Xavi's corner had only been partially cleared.
Xavi then bent a free-kick just wide before Soldado made it 2-0 in the 32nd minute with a precise finish from Fabregas' clever reverse pass.
Defender Gerard Pique was denied a third goal before half-time when he smashed a volley straight at Uruguay goalkeeper Fernando Muslera and another well-worked move after the restart almost resulted in a second goal for Soldado as he just failed to convert Pedro's centre.
Pedro scuffed a shot wide as Spain continued to boss the game although Suarez, who had a quiet night, gave Uruguay some late hope when he curled a 30-yard free-kick over the wall and into the top-right corner.
However, Iker Casillas, who was selected to start in goal by Spain coach Vicente del Bosque, remained untroubled in the closing stages as Spain stretched their unbeaten run to 23 matches.