Jesus Navas helps Spain edge Croatia
Andres Iniesta passed to Navas inside the area after Spain broke through an offside trap, and the substitute forward kicked the ball into an empty net in the 88th minute.
The defending champions dominated possession as expected but failed to create many opportunities at the Arena Gdansk. Goalkeeper Iker Casillas made a pair of clutch second half stops.
Croatia could have reached the last eight with a victory but Casillas made a reflex save on Ivan Rakitic's header in the 59th minute before punching out substitute Ivan Perisic's low volley in the 79th.
Spain finally broke open the Croatia defense after wasting a number of late chances as Xavi Hernandez lobbed a through ball forward for Andres Iniesta, who controlled before flicking a short pass over to Navas to walk into goal with Croatia goalkeeper Stipe Pletikosa arguing for offside.
The goal came moments after Iniesta and substitute Cesc Fabregas failed to convert late opportunities, with the European champions guilty of trying to string together one too many passes.
Rakitic, meanwhile, could only shake his head in disbelief as Casillas got his arms up to deny him after Luka Modric floated an exquisite cross over Spain's defense from the left with the outside of his right foot to meet his run.
Casillas was Spain's steadiest player in defense as the backline was often troubled in the second half by balls into the boxes and Croatia's counters.
Spain was more hesitant than against Ireland while looking forward more often than they did with Italy as Xavi and Xabi Alonso often dropped back to let fullbacks Alvaro Arbeloa and Jordi Alba surge forward in attack.
Iniesta and David Silva orchestrated Spain's attack and combined in the 12th minute to put Iniesta into the area, only for Pletikosa to save the Barcelona midfielder's roller.
Spain showed patience trying to pick Croatia apart with its passing, as Alonso found Fernando Torres with a long pass in the 23rd and the Spain striker managed to get run to the goal line before forcing Pletikosa into saving his angled shot with his left knee.
Spain center backs Sergio Ramos and Gerard Pique also prodded Croatia's goal with long-distance efforts before Croatia finally tested Casillas, who easily saved from Daniel Pranjic in the 25th.
Mario Mandzukic, who has scored three goals for Croatia, had trouble getting free and was down clutching his foot after Ramos cleared away from him deep inside the area.
Spain continued to try slicing that last pass into Croatia's busy area while the Croats aimed for a quick counter, but neither came as the Croats used physical play to slow Spain's attack. Modric saw little possession until his run set up the game's best occasion to that point.
Torres, starting for the second straight game, exited for Navas in the 61st and the speedy winger immediately opened up space for the world champions, while Nikola Kalinic was brought on five minutes later to improve Croatia's attack.
Fabregas entered soon after a wasted a try while alone inside the area, but Spain ultimately was rewarded for its possession and passing when Navas converted to keep the World Cup champions' bid at becoming the first nation to win three straight major championships going.
Croatia fans lit flares in both halves.
Croatia: Stipe Pletikosa; Ivan Strinic, Vedran Corluka, Gordon Schildenfeld, Domagoj Vida (Nikica Jelavic, 66); Danijel Pranjic, Ivan Rakitic, Ognjen Vukojevic (Eduardo, 81), Luka Modric, Darijo Srna (Ivan Perisic, 66); Mario Mandzukic.
Spain: Iker Casillas; Sergio Ramos, Gerard Pique, Jordi Alba, Alvaro Arbeloa; Sergio Busquets, Xabi Alonso, Xavi Hernandez (Alvaro Negredo, 89), Andres Iniesta, David Silva (Cesc Fabregas, 73); Fernando Torres (Jesus Navas, 61).