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.
EXPLOSIVE EXCHANGE: Huckabee Sanders SCORCHES Reporter over Immigration
Sanders joined the Trump campaign early on, and served as deputy press secretary under Sean Spicer. Trump's term, the turnover rate stands at 51 percent, according to the Brookings Institution .
Colorado national forest closes due to wildfire that burned over 22,000 acres
The closest ski resort to the fire, Keystone, is about 8 miles (12.8 kilometers) away and across a large reservoir. The latest fires are stoking fears that a dry winter will lead to a unsafe fire season this summer in the West.
Pompeo talks North Korea, South China Sea with China's Xi
Pompeo, speaking in South Korea after the summit, wouldn't budge on the possibility of sanctions coming off in phases, as both Mr. President Donald Trump on Wednesday morning declared an end to the North Korean nuclear threat .
"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.