Spain will compete in next summer’s UEFA Nations League finals after beating Iberian rivals Portugal 1-0 late in the day on Tuesday.
The Selecao needed just a point to qualify, while Luis Enrique’s Roja needed all three after a shock loss to Switzerland last week and the visitors eventually found a way to book their place in the final four.
Portugal almost gifted Spain an early opener Pablo Sarabia collected the ball from Joao Cancelo on the edge of the Selecao penalty area but his effort was blocked and the hosts missed.
Fernando Santos’ men created their first look at goal midway through the first half when Diogo Jota headed back behind Cristiano Ronaldo to tee up William Carvalho, but Spain had enough men behind the ball to make a block.
Ronaldo was furious that he was not awarded a penalty after a collision with goalkeeper Unai Simon, with the referee instead giving Portugal a corner from which Ruben Neves palmed the Athletic Club stopper from distance.
Simon had to do his best to keep Jota out, soon after a through ball from Bruno Fernandes found him, with the Liverpool striker denied at the near post.
The 30,000 in attendance at the Estadio Municipal de Braga thought Fernandes had found the top corner with an incredible strike from 25 yards, but the illusion was soon revealed as he had actually found the side netting instead.
Jose Gaya’s cross went over the crossbar by Ferran Torres and both sides went into the break.
After the break, Jota stole possession from Dani Carvajal and let Ronaldo run, but Simon quickly got off the line to thwart the Manchester United striker.
A Portuguese free-kick routine saw Fernandes pick out William Carvalho, who laid the ball off for Ruben Dias to fire in, but Carvajal got a vital touch to steer it over the bar.
The Selecao regained possession high up the pitch and Ronaldo looked set to head home from close range, only for Gay to make a timely save.
Substitute Nico Williams almost scored with his first touches of the ball but his curling shot was kept out by Diogo Costa.
Spain upped the ante in the dying embers of the match in search of a winner, grabbing the opener through Alvaro Morata.
Ronaldo’s half-volley from inside the area was saved by Simon’s legs in stoppage time and Enrique’s men held on to the top of the group to ensure Spain progress to the World Cup on a high.
Portugal vs Spain player ratings, Nations League
1. Portugal (4-2-3-1)

GK: Diogo Costa – 6/10 – Kept Spain at bay for much of the game but could do nothing about Morata’s late goal.
RB: Joao Cancelo – 4/10 – Lacked the dynamism he so often show for Manchester City. Was fortunate that Spain didn’t attack his side more often.
CB: Ruben Dias – 5/10 – Was far more uncomfortable in defence than his partner who’s naturally a midfielder.
CB: Danilo Pereira – 6/10 – Clamped down Spain for the most part and looked a natural at centre-back.
LB: Nuno Mendes – 7/10 – Performed his duties well at both ends and brought fans off of their seats with his trickery.
CM: William Carvalho – 6/10 – Provided necessary protection in front of the defence but also kept play ticking.
CM: Ruben Neves – 4/10 – A little more careless in possession than his midfield partner.
AM: Bruno Fernandes – 6/10 – Pressed with intensity and was the creator of Portugal’s best chances.
RW: Bernardo Silva – 4/10 – Played on the periphery and was understandably substituted.
CF: Cristiano Ronaldo – 5/10 – Looked more dangerous than he has all season but still lacked the finishing touches.
LW: Diogo Jota – 6/10 – The liveliest player on the pitch but couldn’t find a goal for his efforts.
Manager: Fernando Santos – 5/10 – Portugal looked worthy of going toe-to-toe with another major rival, which they haven’t done for a while.
SUB: Joao Mario (73′ for Silva) – 5/10
SUB: Rafael Leao (79′ for Jota) – 5/10
SUB: Vitinha (79′ for Carvalho) – 5/10
SUB: Joao Felix (89′ for Neves) – N/A
2. Spain (4-3-3)

GK: Unai Simon – 7/10 – Had a few hairy moments in possession but also made some crucial saves.
RB: Dani Carvajal – 5/10 – Given a rather rough evening by Jota and Ronaldo.
CB: Hugo Guillamon – 4/10 – Looked rather ropey in his one half of football. Hooked at the break.
CB: Pau Torres – 5/10 – His long-ranging passes were often inaccurate and if anything slowed Spain down even more.
LB: Jose Gaya – 7/10 – Kept Silva quiet and made an important challenge to stop Ronaldo.
DM: Rodri – 7/10 – Was competent in midfield and at centre-back.
CM: Carlos Soler – 4/10 – His only notable contribution was a horrendous shot from 30 yards which landed in the cliffs adjacent to the stadium. Subbed on the hour mark.
CM: Koke – 4/10 – Was also very ineffectual and too was hauled off by Enrique.
RW: Ferran Torres – 5/10 – Started brightly but faded very quickly.
CF: Alvaro Morata – 8/10 – After a quiet opening 70 minutes, Morata burst into life and came up trumps for his country.
LW: Pablo Sarabia – 4/10 – Cancelo was offering little to the game and Sarabia failed to capitalise on this.
Manager: Luis Enrique – 6/10 – Made seven changes from Spain’s loss to Switzerland. The same flaws remained but his substitutions got the job done.
SUB: Sergio Busquets (46′ for Guillamon) – 7/10 – Brought some much-needed composure and progression to the midfield.
SUB: Pedri (60′ for Koke) – 7/10 – Spain were much better going forward because of his introduction.
SUB: Gavi (60′ for Soler) – 7/10 – He too opened the game up and the Barcelona trio should probably have started.
SUB: Yeremy Pino (60′ for Sarabia) – 5/10
SUB: Nico Williams (73′ for F. Torres) – 8/10 – What a cameo. Was Spain’s best player after coming on.