Gareth Bale came off the bench to book Real Madrid's place in the Club World Cup final as the European champions recovered from the shock of going behind to beat Emirati champions Al Jazira 2-1 on Wednesday.
Despite dominating throughout, Madrid trailed at half-time to Romarinho's opener in a match also marred by use of the video assistant referee (VAR) that ruled out a goal for both sides.
Madrid's pressure finally paid off 10 minutes into the second half when Cristiano Ronaldo levelled before Bale broke Al Jazira's resistence with his first touch eight minutes from time.
"It's great to get the goal," Bale told Real Madrid TV. "When you come on you want to make an impact, but the most important thing is to win and be in the final."
Real will go for their fifth trophy of the year when they face Brazilian side Gremio on Saturday.
Bale was making only his second substitute appearance since September due to a series of muscle injuries.
But he showed what Madrid have been missing for most of the season with a calm finish after replacing the profligate Karim Benzema.
"I need to be patient, I've had some problems and it takes time. I need to listen to my body," said the Welshman.
Al Jazira, only invited to the competition as champions of the host country, enjoyed their 15 minutes of fame at the break after a remarkable first 45 minutes.
Madrid scored five in the first half against Sevilla on Saturday and could easily have had another handful but for some exceptional goalkeeping from Ali Khaseif.
The Al Jazira captain made an incredible stop to turn a deflected Ronaldo header onto the bar then got down well to parry efforts from Luka Modric and Karim Benzema.
- VAR chaos -
Benzema also had a goal ruled out for a push by Ronaldo in the build-up, but Madrid thought they had finally gone ahead when Casemiro's header deflected off an Al Jazira head and looped over Khaseif.
However, after a four-minute delay for the VAR referral, Brazilian referee Sandro Ricci disallowed the goal due to Benzema being in an offside position despite the fact the Frenchman was arguably not interfering with play.
"I don't like it to be honest," added Bale on the use of VAR.
"Obviously they are going to try it out. For me, football is better without it but it is other people who make the decisions."
In total Madrid had 18 shots on goal in the first half, but were shocked four minutes before the break when the hosts caught the Real defence cold on the counter-attack.
A poor clearance from Nacho gifted away possession inside the Madrid half and Romarinho showed great composure to cut inside and curl his shot inside Keylor Navas' far post.
A monumental upset looked on when Al Jazira had the ball in the net for a second time two minutes into the second half.
However, this time VAR came to Madrid's rescue as Mbark Boussoufa was offside by the finest of margins before slotting home.
Zinedine Zidane's men grabbed that let-off gratefully and were level eight minutes later when Ronaldo was played in by Modric and smashed a shot past Khaled Al Senaani, who had replaced the injured Khaseif moments earlier.
Madrid continued to lay seige to the Al Jazira goal, but the misfiring Benzema shot straight at Al Senaani then hit the post with two other glorious chances.
Benzema was eventually replaced by Bale, who an instant impact as he slotted home Lucas Vazquez's cutback to Real's relief.