European champions Spain suffered a shock first defeat since March 2015 losing 1-0 at home to Georgia in their final warm-up friendly before Euro 2016 in Madrid on Tuesday.
Georgia, ranked 137 in the world, hadn't won a game since defeating minnows Gibraltar in Euro qualifying in October.
However, they defended resolutely and took full advantage of their one real attack when Tornike Okriashvili tapped home at the far post six minutes before half-time.
Spain begin their quest for a third consecutive European Championship against the Czech Republic on June 13 in Toulouse.
Vicente del Bosque had named a stronger side than in Spain's comfortable wins over Bosnia and Herzegovina and South Korea in the past week with the Real Madrid and Atletico Madrid contingent returning after their duties in the Champions League final.
The hosts were camped in the Georgia half for almost the entire match, but paid for a lack of creativity in breaking down the visitors' mass ranks of defence and were caught out on the counter-attack just before the break.
Real Madrid's Lucas Vazquez impressed early on as he made his international debut and from his cross Aritz Aduriz was inches away from opening the scoring with a bullet header that flew just wide.
Bayern Munich midfielder Thiago Alcantara struck the post from outside the box as Spain continued to press.
However, they were caught out when captain for the evening Sergio Ramos was slow to react to Jordi Alba's to spring a Georgia break from which Valeri Kazaishvili's low cross was turned home by Okriashvili.
Del Bosque reacted by making four changes at the break with Barcelona's Andres Iniesta among those introduced.
David Silva then replaced Vazquez on the hour mark and the hosts created far more with their two principal playmakers on the field.
Iniesta and Nolito fired just wide before Jordi Alba mishit his effort from close range straight into the midriff of substitute Georgian goalkeeper Roini Kvaskhvadze.
Yet, despite seven minutes of stoppage time being added on by Icelandic referee Vilhjalmur Thorarinsson, Spain's search for an equaliser petered out as they suffered defeat for the first time in 12 matches.