2010 World Cup champions Spain lacked dynamism and were a far cry from the ruthless side that had hammered Argentina 6-1 in their last match.
Spain goalkeeper David de Gea made a rare error which led to his side drawing 1-1 at home to Switzerland in a World Cup warm-up friendly on Sunday which the hosts dominated but failed to make their superior possession count.
Real Sociedad right back Alvaro Odriozola scored his first international goal with an impressive volley to give the 2010 World Cup winners the lead in the 29th minute at Villarreal's La Ceramica stadium following a dominant start.
Switzerland full back Ricardo Rodriguez tucked into an empty net to level in the 62nd after an uncharacteristically sloppy piece of goalkeeping from De Gea, who failed to hold a weak shot from Stephan Lichtsteiner.
"We did many things well although we didn't take the chances we have, but the fact we played with intensity and continuity against a team as strong as Switzerland is the most important thing," Spain coach Julen Lopetegui told reporters.
"I'm sure in other games we'll be able to make the most of half the amount of chances we had. I'm pleased that we were able to create lots of chances and they barely created opportunities against us."
Lopetegui started without any players who had helped Real Madrid win last weekend's Champions League final against Liverpool while Barcelona holding midfielder Sergio Busquets was a late absentee with a stomach bug.
Lopetegui's side had two-thirds of possession and looked in control of the game until De Gea's mishap, although they lacked dynamism and were a far cry from the ruthless side that had hammered Argentina 6-1 in their last match.
Veteran midfielder Andres Iniesta pulled the strings for Spain in his last appearance on home soil before his expected retirement from international football but was substituted early in the second half as a precaution after banging his knee.
The hosts initially lost momentum after Iniesta left the pitch but they finished the game strongly and substitute Nacho twice came close to snatching a late winner, clipping the post and heading just wide.
Spain travel to their World Cup base in Krasnodar next week and will play their final warm-up game in the Russian city against Tunisia on Saturday, before meeting European champions Portugal in a mouth-watering Group B opener in Sochi on June 15.
Switzerland host Japan on Friday before meeting five-times winners Brazil in their first World Cup Group E game on June 17 in Rostov.
Costa Rica ease past Northern Ireland
Two headed goals from corners and a strike from Joel Campbell gave Costa Rica a comfortable 3-0 win over Northern Ireland on Sunday to lift the Central American side ahead of the World Cup.
Costa Rica had won just two of their past nine games before Sunday but they were far too good for Northern Ireland, who made history by fielding two sets of brothers when second-half substitutes Ryan and Conor McLaughlin joined Jonny and Corry Evans.
Johan Venegas Ulloa opened the scoring for the home side on the half-hour mark when he took advantage of poor defending from a corner to head home from close range.
Campbell doubled their lead seconds after the restart and then Francisco Calvo got a third, also via a corner kick, after 66 minutes.
Costa Rica, who reached the World Cup quarter-finals four years ago before losing to the Netherlands on penalties, will face Brazil, Serbia and Switzerland in Group E this time around.
They face Belgium in Brussels in their final warm-up match on June 11.