On this memorable Friday night, the Spaniards overcame a calamity just 130 seconds into Hierro's tenure, when Ronaldo tried to step by Nacho near the top left corner of the box and the defender's left calf grazed Ronaldo's right foot, spilling the 33-year-old global superstar from Madeira and wreaking a penalty.
Spain, the 2010 champions, scored twice in three minutes just before the hour mark to claw ahead 3-2, a one-goal lead they would maintain till Ronaldo's late dramatics.
It was the 51st treble of Ronaldo's goal-filled career as he became the fourth player to score in four different World Cup and the first to do so at eight consecutive worldwide tournaments.
Nacho's naive trip was a bad start, no way to help compose the nerves, and there was never any doubt how Ronaldo would deal with the occasion.
Lopetegui was unbeaten in 20 worldwide games in charge of the national team, so his new replacement Fernando Hierro has big shoes to fill with a very short amount of time to prepare his squad for the match.
It was an exciting start to one of the group-stage's most anticipated matches and it didn't take long before Ronaldo and Portugal struck first. The way the team came back was excellent with the goals.
Fans on Twitter wondered what Ronaldo's actions meant but many were convinced it was a dig aimed at the bearded Red Devils shot-stopper after his mind games. With such high stakes, this match promises to be a mouth-watering encounter as both the teams will aim to register their first win in the tournament and secure 3 points. Portugal attacked in transition with Ronaldo and Gonçalo Guedes.
The reigning European champions got off to the ideal start when they raced into the lead inside five minutes.
Yet Spain responded well and had the better of the game, as they drew level for the first time in the 24th minute via a trademark piece of centre-forward play by Costa.
Busquets and Costa teamed up again for Spain's equalizer in the 55th.
Spain goalkeeper David de Gea's error just before half-time handed Ronaldo his second of the match and Portugal the lead at half-time but after the break.
All 23 members of the squad took part in the group huddle before the match on the pitch and they then showed great resolve to bounce back after Ronaldo gave Portugal a fourth minute lead from the penalty spot. After a cross by Andres Iniesta, Busquets headed the ball back across the area and Costa touched it into the open net.