It was also the 51st hattrick scored at a World Cup - and the 51st of the forward's glorious career.
Three minutes later, Fernandez redeemed himself for the penalty on Ronaldo with a streaking shot after a ball cleared by the defense got deflected toward him.
"I'm happy, it's my best performance in a World Cup", Ronaldo said after the Group B match.
"That position is a position I saw him train free-kicks for hours after training, asking one of my assistants to put the wall for him, to stay with him and give him balls", he said. But the snap decision by the Spanish Football Federation to dump Lopetegui, after he announced he would take over at Real Madrid post-tournament, has left the team reeling.
After only three goals in total at the last three World Cups, he doubled his tournament tally in one night here, and has now scored at eight consecutive major tournaments going back to Euro 2004, when he was still a teenager.
Straining ties with China, US unveils new de-facto embassy in Taiwan
The US switched diplomatic recognition to China in 1979 but maintains close economic, political and security ties with Taiwan. Taiwanese leader Tsai Ing-wen, several Taiwanese government officials and a USA delegation attended the ceremony.
Sony Crushes Cross-Play Dreams For 'Fortnite'
Of course, there are other, more reasonable explanations for not supporting cross-platform play on certain devices. Sony chiefs are under pressure to respond to complaints about "cross-play" restrictions imposed on Fortnite .
Trump, White House appear at odds over GOP immigration bill
The conservative measure is virtually certain to be rejected due to opposition and moderate Republicans and perhaps all Democrats. Trump's surprise comments provide the latest evidence that no one in the White House but Trump speaks for Trump.
"We have to think match by match", Ronaldo added.
Spain nearly took the lead when Isco crashed a shot against underside of crossbar but Ronaldo put Portugal back in front just before the break, although Spain goalkeeper David de Gea will be haunted by the awful way he spilled a shot he should have gathered.
Speaking moments after the final whistle, De Gea hit back at the severity of criticisms towards him, noting that everyone made mistakes.
After Diego Costa tied the match at 1-1, Ronaldo would once again give Portugal the advantage just before halftime, striking a shot from just outside the box.
Portugal were starting to look leggy now, as Spain looked set to secure what looked like a deserved victory.
4-Cristiano Ronaldo blasts a penalty past Spain goalkeeper David de Gea, going right corner for the 82nd global goal of his illustrious career.