Doha - Roberto Firmino came off the bench to score a stoppage-time winner as a below-par Liverpool edged out Mexican side Monterrey 2-1 at the Club World Cup in Doha on Wednesday and set up a final this weekend against Flamengo.
The game had started very well for Jurgen Klopp's team, with Naby Keita firing them into an early lead, to the delight of almost everyone in the crowd at the Khalifa International Stadium.
However, Monterrey quickly drew level through Argentine striker Rogelio Funes Mori and the most recent winners of the CONCACAF Champions League matched the Reds for long spells.
But then, just as the game moved into the first of three added minutes, and with extra time looming, Firmino popped up to turn a Trent Alexander-Arnold cross into the net from close range and take the Anfield side through.
Having taken time out from their seemingly relentless march towards the Premier League title to come to Qatar, Liverpool will be relieved at coming through this test, and they remain on course to win this competition for the first time in their history.
"It was a tough game. They were very aggressive against us. I think the referee didn't protect us too much but I'm not here to complain about it," said Mohamed Salah after being named the man of the match.
"But I think in the end we showed our quality and we won in the last minute so I think we deserved it."
The victory came despite Klopp being without centre-back Virgil van Dijk due to illness, the Dutchman having previously played in every game this season apart from in the League Cup.
Sadio Mane started on the bench along with Firmino and Alexander-Arnold, with Klopp handing starts to the likes of Adam Lallana, Xherdan Shaqiri and Divock Origi.
Any suggestions Liverpool were not taking this match completely seriously were nevertheless dismissed as they got off to a flying start and were rewarded with the opening goal in the 12th minute.
Salah left the crowd gasping as he produced a stunning pass to release Keita, the midfielder running into the box and lashing a first-time shot past goalkeeper Marcelo Barovero and into the net.
However, Monterrey's response was swift, as they drew level within two minutes of that.
Jesus Gallardo's shot was saved low down by Alisson, but Funes Mori -- the brother of former Everton defender Ramiro -- was on hand to convert the rebound.
The Mexicans grew in confidence after that, with captain Dorlan Pabon, the Colombian international forward, producing one goalbound piledriver that forced a fine save out of Alisson.
The Liverpool goalkeeper also got a vital touch to a Pabon cross with Funes Mori ready to pounce at the near post.
Salah, meanwhile, was being very tightly marked, although Keita came close to a second goal with Barovero diving at his feet following Alex Oxlade-Chamberlain's through ball.
Alisson again denied Pabon early in the second half as he came up with another fine stop from a free-kick, and he was also needed to turn a curling Funes Mori shot around the post midway through the second half.
It was then that Klopp sent on Mane in place of Shaqiri, and soon afterwards it was Alexander-Arnold who entered the fray in place of James Milner. Firmino then came on for Origi five minutes from the end of normal time.
Clearly determined to avoid a draining extra half-hour, Klopp's game plan paid off as Firmino pounced in the 91st minute.
Monterrey will not become the first Mexican club to reach the final of this event, and Liverpool will now be favourites to finish a fabulous year with another trophy.