England were another, although expectations won't be so high on Roy Hodgson's side in Brazil.
Wayne Rooney's first-half header and Steven Gerrard's late solo goal earned England a 2-0 win over Poland at Wembley Stadium, allowing them to stay ahead of Ukraine in Group H and reach a fifth straight finals.
"It is a great feeling to be in Brazil and hopefully we can go in with a little less pressure on ourselves and surprise a few," said Gerrard, who calmed the nerves of England fans with his 88th-minute strike that wrapped up victory in his 107th international.
That meant Ukraine's 8-0 win in San Marino proved immaterial.
The wins for Spain and England were overshadowed by events in Kaunas, where Bosnia-Herzegovina sparked scenes of delirium in their capital city of Sarajevo by beating Lithuania 1-0 to reach their first World Cup since being granted independence from Yugoslavia in 1992.
For many Bosnians, soccer has been a rare cause for joy since the country descended into nearly four years of war two decades ago.
The national team had missed out on the last two major tournaments by losing in the playoffs to Portugal both times, but this time Bosnia-Herzegovina got it right.
Greece defeated Liechtenstein 2-0 but lost out to the Bosnians on goal difference.
Russia needed only a point to guarantee first place in Group F and a first World Cup since 2002 and achieved it by drawing 1-1 at Azerbaijan.
Portugal's 3-0 win over Luxembourg was in vain, leaving Ronaldo's side a point behind, and they must go through the playoffs to reach a major tournament for the third straight time.
- AP