Jaime Fernandez scored 10 of his 16 points in the fourth quarter and Spain finished the game on a 16-5 run to put away Croatia 64-50 and reach the semi-finals of the U18 European Championship Men.
Daniel Diez had nine points and 15 rebounds while Alejandro Suarez added nine points and nine rebounds and Josep Perez came off the bench for seven points, four rebounds and five assists for Spain, who have not lost in Wroclaw.
Marko Ramljak collected 14 points, six rebounds and three assists and Mislav Brzoja had 12 points, but it was not enough for Croatia.
The game was back and forth in the first quarter with six lead changes and three ties and Spain leading 14-12 after one period.
Spain failed to score for three minutes in the second quarter but Croatia could not take advantage of that and the game was deadlocked 25-25 at halftime.
The lead changed hands five times early in the second half and Croatia were up 33-32. But the Spaniards held Croatia to one basket in the final 6:52 and used a 12-3 run to lead 44-36 after three quarters.
Brzoja and Ramljak brought Croatia to within 48-45 with 5:16 remaining. But Spain nailed four three-pointers in five-possession span to spark their decisive final push.