Substitute Joselu scored an 88th-minute winner and Spain beat Italy 2-1 on Thursday at FC Twente Stadium to set up a meeting with Croatia in the Nations League final on Sunday.
The Espanyol striker was just onside as he turned in a deflected shot by Rodri four minutes after replacing Alvaro Morata to prevent the second Nations League semifinal from going to extra time.
It is a second chance for Spain, which reached the Nations League final in 2021 - beating Italy in the semifinals - but lost to France.
Spain had opened the scoring in the third minute when veteran Italy captain Leonardo Bonucci was tackled by Gavi and dispossessed by Yeremy Pino, who then calmly fired past Gianluigi Donnarumma for his second international goal.
But Ciro Immobile hit back quickly for Italy, converting an 11th-minute penalty after Nicolo Zaniolo hit a powerful shot that hit the arm of France-born Real Sociedad defender Robin Le Normand, who was making his debut for La Roja.
Spain takes on Croatia in Rotterdam on Sunday in the final while Italy will face hosts the Netherlands in the third-fourth match also in Enschede.
Davide Frattesi thought he had put Italy ahead in the 22nd after running onto a long pass by Jorginho and slotting a low shot through the legs of Unai Simon, but the effort was ruled offside.
The crowd at FC Twente stadium in the eastern Dutch city of Enschede was far quieter than the raucous Croatia supporters who roared their side to a 4-2 victory over hosts the Netherlands. The exception was Spain fans often calling on Rodri to shoot apparently after seeing his winning goal for Manchester City in the Champions League final. They got their wish in the 88th minute when his effort set up the winner.
While 37-year-old Luka Modric starred in Croatia's victory, Bonucci - one year younger - could not make amends for his early error and was substituted at halftime.
In his absence of Italy's defensive talisman, Spain started the second term strongly and twice came close to taking the lead.
Donnarumma denied Mikel Merino with a good save in the 49th minute. Morata then gathered the rebound with his back to the goal, but shot just wide.
Three minutes later, Rodri connected with an acrobatic effort that sailed just over the bar after Donnarumma weakly punched away a Jordi Alba free kick.
Italy came close to taking the lead in the 65th minute, but Unai Simon's reflex save denied Davide Frattesi a goal.