Roger Federer booked his spot in yet another Grand Slam semi-final after a titanic five-set battle with Tennys Sandgren.

The Swiss maestro initially looked to have everything under control, cruising to a 6-3 win in the first set, but, a spell of uncharacteristic unforced errors in the second opened the door for the bullish American.

Sandgren ruthlessly ripped through the next two sets, winning both 6-2 to leave Federer rocking and in real danger of crashing out.

The American was on fire in the fourth set as well as he served himself to the brink of a massive upset.

It took the escape act to end all escape acts for Federer to cling on as he miraculously saved no less than seven match points before winning an epic tiebreaker in the fourth.

At one point, Federer was 3-6 down in the tiebreak before clawing his way back into it to eventually clinch it 10-8. 

After the absurd drama of the fourth, the final set proved to be a bit of a damp squib as Federer asserted his authority over an exhausted Sandgren.

The American looked a broken man having come within a whisker of victory and simply couldn't match Federer's level.

Federer showed the value of his immense experience as he efficiently killed off the tie, claiming the final set 6-3 to earn a place in what will be his 45th Grand Slam semi-final.

"You’ve got to get lucky sometimes,” Federer said through a tired smile in the aftermath of his win.

“I was just hoping that maybe he wasn’t going to smash a winner. If he misses one or two [match points], who knows what’s going to happen? I think I got incredibly lucky today."

Federer now faces the prospect of a tantalising clash with age-old rival Novak Djokovic in the next round.

The Serbian will have to negotiate a tricky tie with Milos Raonic first but will be licking his lips at the possibility of facing an error-prone Federer in the final four.

The Swiss always raises his game when Djokovic is on the other side of the net but simply has to cut out the errors if he is to have any hopes of making the final.

Another Grand Slam final and a shot at a staggering 21st title should be all the motivation Federer needs - it promises to be quite a match.