Jesus Navas struck a late winner but with Italy beating Ireland 2-0 the Spanish needed the result as a defeat would have put them out.
"Suffering towards the quarters," was the verdict of sports daily AS which was not impressed with the overall performance.
"A goal from Navas three minutes from time relieved a Spain which did not play well and was a bundle of nerves for much of the match," added AS.
El Pais daily gave thanks for two good saves from reliable keeper Iker Casillas as he kept the score goalless before Navas finally rescued the situation.
"Casillas avoids catastrophe," was El Pais' verdict.
Marca sports magazine was also relieved as it admitted in an editorial: "We suffered like never before but we won as always," in allusion to glory at Euro 2008 and the 2010 World Cup, triumphs which did away with four decades of underachievement.
"The team went through top of the group after a poor match which it wasn't able to settle until the 88th minute. (Coach Vicente) Del Bosque's side suffered for a long while during which time a Croatian goal would have eliminated them from the Euros."