Spain couldn't manage more than a 1-1 draw against Switzerland in its final match before travelling to Russia for the World Cup. Spain was in control from the start but failed to capitalize on its chances and paid the prize after a second-half blunder by goalkeeper David de Gea.
Alvaro Odriozola opened the scoring for the hosts with a neat volley from just outside the area in the 29th minute. Ricardo Rodriguez equalized for the Swiss in the 62nd after De Gea dropped the ball in front of goal while trying to hold on to a weak shot from inside the area.
Spain coach Julen Lopetegui was satisfied with his team's performance despite the draw.
"I liked that we were able to create many scoring opportunities against a difficult team like Switzerland," Lopetegui said. "We played at a high level. There were a lot of positives."
The result kept Spain unbeaten in 19 matches since Lopetegui took over after the 2016 European Championship.
"We played well," said Odriozola, who was making only his third appearance with the national team. "It was a good tune-up for the challenge that awaits us. We leave in good spirits."
Spain, which will travel to Russia on Thursday, wasn't at full strength as defensive midfielder Sergio Busquets was dropped from the starting lineup after falling ill with gastroenteritis.
Real Madrid players also weren't fully available after reporting late to the squad because of the Champions League final. Sergio Ramos, Francisco "Isco" Alarcon and Dani Carvajal didn't even travel for the match in Villarreal, although Nacho Fernandez, Marco Asensio and Lucas Vazquez were second-half substitutes.
Fernandez nearly scored Spain's winner with a shot that hit the post in second-half injury time.
Lopetegui played with Diego Costa and Iago Aspas up front, while Jorge "Koke" Resurreccion, Thiago Alcantara, Andres Iniesta and David Silva were in midfield. Cesar Azpilicueta and Gerard Pique started in central defence.
Spain will head to Russia looking to rebound from early eliminations at the 2016 European Championship and the 2014 World Cup. La Roja won Euro 2012, the 2010 World Cup and Euro 2008.
Spain's final warm-up match will be against Tunisia on Saturday in Krasnodar, the team's base in Russia. Its first game at the World Cup is against European champion Portugal on June 15.
Spain's next Group B matches will be against Iran on June 20 and Morocco on June 25.
Switzerland will host Japan on Friday in its final warmup match before its World Cup opener against Brazil on June 17 in Group E. It then faces Serbia on June 22 and Costa Rica on June 27.