Portugal had moved into a comfortable position in the one-off game against Turkey, leading 2-0 at the break thanks to goals from Otavio and Diogo Jota.
But Turkey rallied midway through the second-half, pulling a goal back on 65 minutes through Burak Yilmaz and then winning a penalty five minutes from time when former City striker Enes Unal was fouled in the box.
But Yilmaz blazed his spot-kick over and the chance to force extra time was gone, with the hosts grabbing a decisive third from Matheus Nunes in added time.
Bernardo was everywhere.
Wearing the No.10 jersey, he appeared to have a free role, collecting the ball from deep and driving the team forward.
CITY+ | SIGN UP TO ACCESS EXCLUSIVE CONTENT
He helped out his defence, doubling up on wingers and he was the first to press from the front, often sprinting 30 metres to chase the ball and put pressure on the Turkey back-line.
He came close to adding a third early in the second-half with a low drive that the keeper saved well.
There was one nervous moment when he went up for a header and as he landed, a Turkish player fell directly on his back at full force before he got a passing boot in the head.
But it takes more than that to knock Bernardo out of his stride and he completed the full 90 minutes.
Now the Portuguese face North Macedonia who stunned Roberto Mancini’s Italy with an added time winner in Palermo to win 1-0.
The European champions are now out of the World Cup and if Portugal can win the play-off final next Tuesday in Porto, Bernardo, Ruben Dias and Joao Cancelo - the latter both missed this game - will be on their way to Qatar for this winter’s World Cup.