Sergio Ramos scored the winner from the penalty spot as Spain opened their Euro 2020 qualifying campaign with a 2-1 victory at home to Norway.
In their first match in Group F at Mestalla on Saturday, Luis Enrique's side were dominant but saw Josh King cancel out Rodrigo Moreno's opener.
Inigo Martinez needlessly gave away a penalty that Bournemouth striker King confidently stroked home to level the scores in the 76th minute.
But another error at the other end handed Spain the points, the otherwise impressive goalkeeper Rune Jarstein bringing down Alvaro Morata and Ramos converting with a Panenka.
Norway were on the back foot from the off but it took until the 16th minute for Spain to find a way through.
Jordi Alba played a one-two with Marco Asensio and the former Valencia left-back put a cross on a plate for Rodrigo to tuck home in front of his home fans.
Spain had a lucky escape when Tarik Elyounoussi somehow failed to convert a low cross from Markus Henriksen, the centre having cut out David de Gea in the hosts' goal, before the offside flag denied Alba.
Ramos sent a volley over the crossbar as Spain continued to create chances after the interval but Norway were awarded a penalty as referee Andris Treimanis adjudged Martinez to have dragged Bjorn Johnsen to the ground.
De Gea guessed correctly in diving low to his left but did not get close to King's precise spot-kick.
Morata had wasted a series of openings and missed his best chance yet when heading a Dani Ceballos cross off target, but when he raced through on goal Jarstein made a critical error.
Captain Ramos was never going to pass up the opportunity, floating his penalty into the space vacated by Jarstein to score for his fifth consecutive international appearance.
What does it mean? Spain need a striker
Luis Enrique's faith in Rodrigo was justified as the Valencia striker netted his fifth international goal, but the crisis of confidence engulfing Morata appears no nearer its end.
With Diego Costa injured, it felt fitting that Spain needed skipper Ramos to bail them out.
Ramos keeps his cool
Ramos is not everyone's favourite defender, too often playing the pantomime villain, but it is no coincidence the defender repeatedly comes up trumps for club and country when needed.
His international goalscoring record is highly impressive and although he keeps using the Panenka, goalkeepers are still being fooled by a shuffle at the start of his run-up.
Elyounoussi's stunning miss
Norway were not totally outclassed and had Elyounoussi scored an open goal they may well have claimed at least a draw from their trip to Spain.
He completely misjudged a perfect cross from Henriksen and somehow turned the ball away from De Gea's net when any contact seemed certain to result in the equaliser. A remarkable miss.
Spain resume their campaign away to minnows Malta on Tuesday, the same day Norway host neighbours Sweden in Group F.