Gerard Pique scored in the 87th minute as European champions Spain opened their Euro 2016 challenge with a 1-0 victory over a spirited Czech Republic team on Monday afternoon in Toulouse.
La Roja needed all three points to move level with Croatia at the top of Group D, but Vicente del Bosque's side struggled to breach a Czech Republic goal despite dominating the contest from start to finish.
There was to be a late sting in the tail for Czech Republic, however, as Barcelona centre-back Pique headed an Andres Iniesta cross into the back of the net to secure a vital win for the holders.
Vladimir Darida had the chance to threaten Spain goalkeeper David de Gea from a 25-yard free kick in the fifth minute of action after Pique had felled Tomas Necid, but the number 22's effort was straight into the wall.
Spain's first half-chance of the match came in the 15th minute when Sergio Ramos met a deep free kick from Iniesta, but the centre-back's header was always moving away from goal.
Less than one minute later, David Silva set up Alvaro Morata with a cross from the right, but the Juventus striker, who recovered from a hamstring injury to start, could only fire his effort at Petr Cech from close range.
In the 29th minute, Morata and Cech went head to head once again after the Spain forward found space in a wide position and once again the Arsenal goalkeeper was on hand to make the stop.
The pressure from Spain was relentless as the first period approached its latter stages, and Sergio Busquets volleyed a Nolito cross over the crossbar in the 35th minute as the score remained goalless.
It was Nolito's turn to try his luck from distance two minutes later, but the forward's effort was always moving over the crossbar as Spain continued to dominate possession of the ball in Toulouse.
Cech had to be in fine form on two more occasions in the 41st minute - first to keep out Alba's strike from a wide position, before smothering a Silva effort after more intricate passing inside the Czech Republic box.
Czech Republic created their first chance of note in the 45th minute when Theodor Gebre Selassie broke down the right and eventually the ball found Necid onside in a central position, but De Gea was on hand to make the save.
Spain came close on three separate occasions inside the first two minutes of the second period, but Roman Hubnik managed to turn a low Morata cross onto the outside of Cech's post, before Nolito and Ramos both had close-range efforts blocked following a scramble inside the box.
Morata continued to take up dangerous positions inside the Czech Republic box as the second period began to develop, but it just was not falling for the 23-year-old as the score remained level approaching the hour mark.
Czech Republic had their second chance of the match in the 58th minute when Hubnik made first contact on a free kick into the Spain box, but De Gea was once again on hand to make the save.
Down the other end, Iniesta unleashed a long-range strike following a spell of Spain possession, but it was comfortable for Cech, whose team were growing in confidence after a difficult first period.
Czech Republic had a golden chance to take the lead in the 66th minute when Gebre Selassie rose inside the Spain box and headed towards the bottom corner, but somehow Cesc Fabregas made a clearance on his own goal-line.
Spain had another golden chance 20 minutes from time when Silva found Alba with a sensational pass inside the Czech Republic box, but Hubnik came from nowhere to clear after Cech had been side-stepped by the Barcelona left-back.
Moments later, Silva attempted to curl one into the far corner following another period of Spain pressure, but the Manchester City attacker's effort was wide of the post as it remained 0-0 entering the final stages.
Del Bosque introduced Aritz Aduriz in a bid to breach the Czech Republic goal and the Athletic Bilbao striker headed a Ramos cross wide of the post in the 79th minute, before fellow substitute Thiago was denied by a fine last-ditch challenge from Ladislav Krejci inside the box.
Pedro was Spain's third and final change as Del Bosque went for broke in the final 10 minutes, and it paid off in the 87th minute when Pique headed an Iniesta cross past Cech to break Czech Republic hearts in Toulouse.
There was almost a dramatic equaliser when Darida found space inside the Spain box in the second minute of stoppage time, but the midfielder could not beat De Gea from close range.
Spain will continue their Group D campaign against Turkey on Friday night, while Czech Republic will take on Croatia.