A rare mistake from David De Gea cost Spain a friendly victory over Switzerland in their penultimate fixture before this summer’s World Cup.

They are still to face Tunisia next Saturday before their World Cup opener against neighbours Portugal on June 15, but will perhaps do so without the momentum they hoped for after being held to a 1-1 draw by Switzerland, despite being the superior team.

Alvaro Odriozola’s first-half goal, on the occasion of only his third international cap, gave Spain a half-time lead.

Ricardo Rodriguez was then gifted Switzerland’s equalising goal midway through the second half, when De Gea fumbled a routine shot into his path from close range.

Diego Costa – competing for a starting place against Portugal – and Koke both threatened on goal during a first half in which the guile of Andres Iniesta and David Silva ensured Julen Lopetegui’s team largely controlled possession.

Odriozola’s goal came in the 28th minute, by when Switzerland had yet to look like scoring.

The 22-year-old, who was deputising for the injured Dani Carvajal, produced a superb, powerful volley from the edge of the area and with the outside of his boot after Silva had hooked the ball back and found him in space.

Costa, with a close-range diving header, and Iniesta both went close to doubling Spain’s lead, the latter when he forced Yann Sommer into a fine save.

Iniesta again went close in the second half, before the equalising goal that went against the run of play.

Stephan Lichtsteiner, earning his 100th cap, then tested De Gea with a curling effort in the 62nd minute, and though he dived well to save he spilt the ball straight to Rodriguez, who then calmly scored straight from the rebound.

Substitutes Lucas Vazquez and Rodrigo later combined to almost restore Spain’s lead, and Thiago Alcantara wasted two further goalscoring chances, before Nacho twice went close in added time.

First he sent a curling finish against the post, and then he headed wide after climbing highest from a corner.

Switzerland instead remained resilient, as they will also plan to be in Friday’s friendly against Japan, before their World Cup campaign begins against Brazil.