Roger Federer survived another five-set showdown ©Getty Images

Roger Federer survived another five-set marathon and Ashleigh Barty kept dreams of a home champion alive on a pulsating first day of quarter-finals at the Australian Open.

Swiss icon Federer was pushed all the way by American Tennys Sandgren and had to save seven match points at Melbourne Park.

After a see-saw encounter the third seed finally found a way and came through 6-3, 2-6, 2-6, 7-6, 6-3.

Federer was also given a huge fright in the third round when he was two points away from elimination against Australia's John Millman.

He recovered to win that clash in five sets, too, and his quest for a 21st Grand Slam title and a seventh in Australia continues.

The 38-year-old has now set-up a mouth-watering semi-final showdown with defending champion Novak Djokovic.

"I didn't deserve this one, but I'm standing here and I'm obviously very happy," said Federer.

"I feel a bit bad in a way because I didn't feel like he did anything really wrong.

"It's just luck at some point. 

"I've been on the other side, as well. 

"These ones just sting, and they hurt. 

"But I could have blinked at the wrong time and shanked. 

"That would have been it."

Federer received a code violation for swearing during the match and benefited when Sandgren collided with a ball girl, injuring his knee.

Djokovic, seeded second, enjoyed much serener progression as the Serbian knocked out Canada's 32nd seed Milos Raonic 6-4, 6-3, 7-6.

He has won the Australian Open a record seven times and is hoping to capture his 17th Grand Slam in all this week.

Barty's win in the women's last eight was the most celebrated of the day as Australians dream of the 42-year wait for a home singles winner coming to an end.

The world number one and top seed is seen as the best chance in years to end a drought which stretches back to Chris O'Neil's women's title in 1978.

She got past the Czech Republic's seventh seed Petra Kvitová with a 7-6, 6-2 win over the two-time Wimbledon champion.

Ashleigh Barty maintained the home charge in the women's draw ©Getty Images
Ashleigh Barty maintained the home charge in the women's draw ©Getty Images

French Open champion Barty, who saved a set point in the first, is already the first Australian woman to reach the semi-finals in Melbourne since 1984.

It will be her first time playing in the last four when she takes on American Sofia Kenin next.

"This is absolutely incredible," said Barty, who lost to Kvitová at the same stage of last year's Australian Open.

"I knew I had to bring my absolute best today against Petra. 

"It's a challenge, I love it. 

"I love testing myself against Petra. 

"She has this way of bringing out the very best in me.

"She came at me with all guns blazing, that first set could have gone either way. 

"It was really important to try and get my nose ahead when I could. 

"It was nice to save a set point and get a roll on early in the second set with a couple of quick breaks."

Kenin had only previously reached the fourth round of a Grand Slam tournament.

The 16th seed knocked out Tunisia's Ons Jabeur, 6-4, 6-4, to continue her superb run.

Jabeur had made history by becoming the first Arab woman to reach the last eight of a Grand Slam.

All four remaining quarter-finals are tomorrow.

Spanish world number one Rafael Nadal takes on Austria's Dominic Thiem, with Switzerland's Stan Wawrinka playing Germany's Alexander Zverev.

In the women's draw, Romania's Simona Halep takes on Estonia's Anett Kontaveit and Spain's Garbiñe Muguruza plays Russia's Anastasia Pavlyuchenkova.