Group C was in the balance until the final few minutes on Monday, with the reigning champions qualifying for the last eight thanks to a 1-0 win and Italy joining them after beating the Republic of Ireland.
Both teams could have been eliminated had they conceded a late goal, but instead Jesus Navas scored Spain's winner before Mario Balotelli wrapped up a 2-0 win for the Azzurri.
Their respective opponents will be discovered on Tuesday, when France, England and co-hosts Ukraine battle for the two qualifying places in Group D, and Alonso said: "Clearly, the important thing was to advance as group winners.
"We knew it wasn't going to be easy because Croatia are a good team and had chances to go through, too. We managed to keep a clean sheet despite their efforts, and at the end of the day, the goal calmed our nerves."
Spain are bidding to become the first team ever to win three successive major international tournaments, having also lifted the FIFA World Cup™ in South Africa two years ago. Alonso continued: "We have achieved great things in the not-so-distant past, but we also struggled a lot, you cannot forget that. If we want to repeat that (success), it'll definitely be another hard task."
Goalkeeper Iker Casillas, who made a crucial second-half save from Ivan Rakitic's header, said: "They made it very difficult for us to create chances, they defended very well. In the end we were lucky, scoring late on. It felt like a weight off our shoulders.
"I was lucky in one situation that could have put us in trouble, but I am happy the team managed to qualify for the next round."
Sleepless nights ahead for Rakitic
Sevilla midfielder Rakitic was distraught afterwards, and said: "I did not manage to take the chance that came my way. I think I will probably have sleepless nights thinking about that. It was obvious that we gave everything on the pitch, we gave it our best shot. I can honestly say that my soul was left on that pitch, and I think I need a few people to carry me off the pitch because I am literally dead."
Team-mate Ognjen Vukojevic added: "We will regret missing Rakitic's chance - if we had scored that I think it would have changed the course of the game."
But he added: "I think we competed against the mighty Spain. Unfortunately we are not going through to the next round, but I think that Croatia have big prospects for the future. We are going back home with our heads held high."