Novak Djokovic has fended off a strong challenge from Ernests Gulbis to advance through to the semi-finals of the Rogers Cup.
World number one Djokovic appeared to be cruising towards the last four after breaking the Gulbis serve in the sixth game to move 4-2 ahead in Montreal.
However, the underdog, who sits 87 places below his Serbian counterpart, defied his ranking by breaking back in the seventh and 11th game to earn a 6-5 lead, before holding serve to draw first blood.
The prospect of a giant killing increased midway through the second set when the Latvian pulled out another break to move 3-2 ahead, but failed to win on his own serve as Djokovic levelled.
From there, the duo traded blows en route to a tie-break, which Gulbis looked poised to win after leading 6-4 to go one point away from victory.
Nevertheless, nine-time Grand Slam winner Djokovic dug deep and soon levelled at 6-6, before ultimately levelling up the match by edging the tie-break 9-7.
The Serb found his best form in the deciding set as he took the game to Gulbis to knock him out of his rhythm on serve. The 28-year-old secured three breaks of serve to clinch the set 6-1 and secure his place in the last four of the tournament.
Djokovic will now play Jeremy Chardy in the semi-finals of the competition.