Roger Federer will play Andy Murray in the semi-finals of the Australian Open after the second seed battled his way to a 7-6 (7-4) 4-6 7-6 (7-4) 3-6 6-3 win over Jo-Wilfried Tsonga.
Federer showed only fleeting glimpses of his brilliance during the first four sets but stepped up when it really mattered to see off his French opponent in three hours and 34 minutes.
Tsonga was the better of the two for long periods but slipped away dramatically in the decider on Rod Laver Arena.
Federer, who reached his 10th straight Melbourne semi-final with the win, started in commanding fashion with a break in the opening game but was then broken himself for the first time this year.
Tsonga then managed to keep it on serve as the two players settled into a rhythm, but the seventh seed could do little in the tie-break as Federer upped his game to take it 7-4.
The second set was also closely fought but went Tsonga's way thanks to a solitary break in game seven, as Federer struggled to find any consistency.
A match which had yet to scale real heights started to warm up in the third set, which also went to a breaker. And it was Federer who again came through, some wonderful scrambling defence forcing his opponent to push a low backhand volley wide on set point.
The 17-time Grand Slam champion appeared to be going in for the kill when he fashioned four break points early in the fourth but Tsonga held on, aided by some big serving and heavy groundstrokes.
The 2008 runner-up established a 4-2 lead when Federer pushed a routine forehand beyond the baseline, with the players then trading breaks before Tsonga held firm to serve it out and take the contest into a deciding set.
Tsonga was dominating on serve and dictating the rallies but the fifth set proved to be somewhat of an anti-climax, as Federer raced out to a comfortable lead.
Tsonga did stave off four match points when serving to stay in it but was merely delaying the inevitable as Federer got the job done to secure his passage into the last four.