The two teams - along with Group C rivals Italy, who were facing the Republic of Ireland in Poznan at the same time - went into the closing minutes of Monday night's action with their progression still in the balance.
With the game in Gdansk goalless, a Croatia winner would have eliminated Spain, while an equaliser for the Republic would have seen Italy knocked out.
In the event, Jesus Navas' simple finish settled Spanish nerves before Mario Balotelli secured Italy a 2-0 success to ensure the group big guns marched on.
And Casillas said: "I think it was a very tense match, but that is normal because it was important to get through to the next round.
"Croatia were well prepared to face us. 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."
Goalscorer Navas added: "It's great to qualify this way, especially if you win. We added more points to our tally and finished first in our group. We are very happy about it.
"Croatia were great opponents but we were able to fight our way to this victory. We always go for the win. That's what we believe in, that's what we play for."
France, England or co-hosts Ukraine await in the last eight and Navas said: "Whoever we have to face, we will stick to our game. I am really looking forward to whoever we will have to play."
Croatia had chances to snatch victory - not least when Ivan Rakitic's diving header forced a sharp save from Casillas, who said: "I was lucky in one situation that could have put us in trouble."
Rakitic added: "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 Danijel Pranjic added: "As long as the match was still scoreless we had a chance. If Rakitic had scored, who knows how this match could have ended.
"If you can make Spain nervous until the last minute of the match about getting through, I think that is an outstanding performance."
Chelsea won the Europa League on Wednesday. The Blues defeated Benfica 2-1 on injury time goal from Ivanovic.
adidas has added some color to the Predator line with this new colorway. Released on May 17. Be the first to own a pair.
The Liverpool 2013/14 soccer jersey is available for pre-order. The Reds are eager to compete for silver next season.
The adidas Nitrocharge is the most talked about new cleat in years. It was released on May 15 and will take your pitch by storm.
The push for more color on their cleats, adidas has added the infrared colorway to the adiZero f50 Line.
Borussia Dortmund hears Wembley Calling and are headed to London for the Champions League final.
The new PUMA evoSPEED 1.2 FG. A great new soccer cleat with classic look and first time for PUMA to be on the cleat.
The Juventus jersey for the 2013/14 was released earlier this week. Be the first to wear the colors of the Old Lady.
Ajax has released their away soccer jersey for the 2013/14 season. Get in the Gear.
One of the top soccer cleats for control the Nike CTR360 will not let you down on the field in tight spaces.