Spain remain in the hunt for a place at the UEFA European Under-21 Championship despite being pushed all the way by a spirited Liechtenstein side who eventually succumbed 3-1 in Ponferrada.
Juan Ramón López Caro's side knew defeating Group 4's basement side was imperative with the Netherlands – 2-1 winners against Spain in November – six points ahead of them at the top of the standings.
Getafe CF's Dani Parejo settled early home nerves by smashing in a free-kick after 13 minutes, but Rony Hanselmann stunned the hosts when he latched on to Burak Eris's centre before firing in the equaliser in the 58th minute.
Spain rallied and when substitute Fran Mérida's low drive hit an upright with 17 minutes remaining, fellow replacement Adrián was on hand to knock in the rebound. Sevilla FC's Diego Capel made sure of victory when he converted a penalty before the end after Parejo was felled in the area by Sven-John Beck.