Roger Federer beat fellow Swiss Stan Wawrinka 7-5 6-3 1-6 4-6 6-3 to reach the Australian Open final and stay on course for an 18th Grand Slam title.
The 35-year-old will face Rafael Nadal on Sunday if the Spaniard beats Grigor Dimitrov in Friday’s semi-final.
The Swiss, returning from a six-month lay-off to rest his left knee, last won a major at Wimbledon in 2012.
He is the oldest man to reach a Grand Slam final since Ken Rosewall did so at the 1974 US Open at the age of 39.
Federer’s extraordinary run in Melbourne had already seen him beat higher seeds Tomas Berdych and Kei Nishikori to reach the last four.
Federer, seeded 17th following his injury, had an 18-3 record against the fourth seed coming into the semi-final, but the two had never played a five-set match.
Both players needed medical treatment during a match of high intensity but it was the 17-time Grand Slam winner who finally prevailed after three hours and five minutes.
Federer will now seek a fifth Australian Open title on Sunday, and his first since 2010.