Cristiano Ronaldo came off the bench and scored an opportunist goal which set Portugal on the way to a 2-0 win in Andorra on Saturday that maintained their chances of qualifying directly for the World Cup.
Ronaldo's 63rd-minute goal, his 15th of the campaign, rescued Portugal as they struggled to break down Andorra and, followed by a second from Andre Silva, set up a mouth-watering showdown with Group B leaders Switzerland in Lisbon on Tuesday.
That match will decide who wins the group and goes straight to Russia and who has to go into the playoffs.
Switzerland, 5-2 winners over Hungary, lead with a maximum 27 points from nine games and need only a draw while Portugal, on 24 but with a goal difference which is better by eight, will top the group if they win.
The winners of the nine European groups qualify directly for the World Cup and the best eight of the runners-up go into a playoff round for four more places. Whoever finishes second in Group B is assured of a playoff place.
The European champions were desperately short of inspiration as they struggled for more than an hour to break physical, ultra-defensive opponents on an artificial pitch that appeared to have taken a battering and was not in a fit state for a World Cup qualifier.
Coach Fernando Santos decided to leave Ronaldo on the bench for the start as Portugal's record scorer was carrying a yellow card and another would have ruled him out of the Switzerland game.
Ricardo Quaresma wasted Portugal's first real chance when he got a free header at the far post but sent the ball into the side-netting.
The flamboyant winger brought a flying save from Andorra goalkeeper Josep Gomes who also parried a powerful Pepe drive while Silva volleyed over from close range, but it was a laboured display from Portugal.
Ronaldo gave coach Santos a knowing look as the two left the pitch at halftime and started the second half.
He did not make an immediate impact, but when Joao Mario's cross was deflected into his path Portugal's record scorer reacted in a flash, bringing the ball down and driving his shot past Gomes.
Ronaldo's goal was his 79th in 144 appearances and only his second scored as a substitute. Silva added the second with four minutes left, slipping the ball in from close range after Danilo headed down Ronaldo’s cross.