There has been little to separate Spain and Portugal in their recent meetings.
Heading into this World Cup last-16 tie, six of their previous seven matches had ended in draws after 90 minutes.
And for long periods in Dallas, it appeared extra time and penalties awaited - just like when the sides met in the Nations League final in June 2025, when Portugal won on penalties.
In a goalless first half, it was Spain who produced the better chances, but Portugal went closest to breaking the deadlock through Mendes.
The second half was devoid of much quality but for the decisive moments as the game inched towards extra time.
The European champions caught the Portugal defence napping after Rodri earned them a free-kick and Torres slipped in Merino, who finished into the bottom left corner to begin Spanish celebrations in earnest.
But for Ronaldo - captain, leader and inspiration behind Portugal's Euro 2016 triumph - this is the end of the road, at least on football's grandest stage.
The five-time Champions League winner has said this would be his final World Cup while, before last week's last-32 game with Croatia in Toronto, Ronaldo's sister stated this tournament would be his "last dance"., external
The Portugal captain tested Unai Simon - who has now gone 609 minutes without conceding at the World Cup - early in the 12th minute and almost poked in a knock back across the goal from his Al-Nassr team-mate Joao Felix in the 37th.
However, it was an underwhelming display from the forward, who stayed on the pitch until the final whistle but registered just 19 touches, with only three of them inside the box.
Spain's 18-year-old Yamal was among those who consoled a crestfallen Ronaldo after the game in a moment that felt symbolic of football's changing of the guard.