LONDON (AP) The match, and Roger Federer's bid for a record eighth Wimbledon championship, essentially should have been over after a little more than 1 1/2 hours Wednesday.

Already trailing two sets to none, he was down love-40 while serving at 3-all in the third.

Once that problem was solved, his quarterfinal against Marin Cilic really could have concluded 45 minutes later, when Federer faced a match point at 5-4 in the fourth. Or 10 minutes and two games later, when Cilic again was a point from winning. Or another 10 minutes after that, when Cilic held a third match point.

Through it all, Federer, a month shy of his 35th birthday, would not go away. And Cilic, who beat Federer in straight sets en route to the 2014 U.S. Open title, could not close the deal. Saving that trio of match points, Federer eventually emerged with a don't-look-away-or-you'll-miss-something 6-7 (4), 4-6, 6-3, 7-6 (9), 6-3 victory over Cilic to reach his 11th semifinal at the All England Club.

''I fought, I tried, I believed,'' Federer said after his 10th career comeback from a two-set hole, equaling the most on record. ''At the end, I got it done.''

Indeed, he did. When he capped his escape with a pair of aces at 126 mph and 115 mph, the third-seeded Federer thrust both arms overhead and violently wagged his right index finger. He's no longer ranked No. 1. He hasn't won a Grand Slam trophy since 2012. He dealt with knee surgery and a bad back this season, the first since 2000 that he arrived at Wimbledon without a title. He sat out the French Open, the first major he missed since 1999, raising doubts about his readiness for Wimbledon.

''To test the body, to be out there again fighting, being in a physical battle - and winning it - is an unbelievable feeling,'' said Federer, who could become the oldest man to win a major since Ken Rosewall did it at 37 at the 1972 Australian Open. ''Yeah, I mean, it was an emotional win.''

On Friday, Federer faces No. 6 Milos Raonic, a 6-4, 7-5, 5-7, 6-4 winner against No. 28 Sam Querrey, the man who surprised No. 1 Novak Djokovic in the third round.

Raonic, beaten by Federer in the 2014 Wimbledon semifinals, declared: ''I'm happy that I have another shot at him.''

On the other half of the draw, No. 2 Andy Murray, the 2013 champion, barely avoided the same fate as Cilic and held off No. 12 Jo-Wilfried Tsonga 7-6 (10), 6-1, 3-6, 4-6, 6-1. Murray's seventh Wimbledon semifinal will come against No. 10 Tomas Berdych, who eliminated No. 32 Lucas Pouille 7-6 (4), 6-3, 6-2.

It'll be tough for any remaining match to achieve the intensity of Federer vs. Cilic.

Both served supremely well for stretches. Federer led in aces, 27-23, was broken only once, and in the last two sets, altered his stance on returns to get a better read on the ninth-seeded Cilic's speedy serves. There was a lot of quick-strike tennis, yes, but still room for lengthy, engaging points. There were rare signs of frustration from Federer, who swatted a ball angrily after one fault, then gave a line judge a talking-to about a call.

Most memorable, though, were Cilic's wasted opportunities, starting at 3-3 in the third set.

''That switched, a little bit, the momentum,'' conceded Cilic, who was 52-0 at majors after taking the first two sets.

He earned three break points by smacking a forehand passing winner. On the first, looking tight, Cilic netted a backhand. On the second, he sent a forehand long, and Federer let out a guttural yell. On the third, Cilic's backhand return went wide, and Federer shouted again. Federer took the next two points to hold, and at the ensuing changeover, fans chanted: ''Let's go, Roger! Let's go!''

Seemingly all 15,000 or so spectators at Centre Court willed Federer on, rising to their feet and roaring louder with each game - and, sometimes, each point - that went their man's way.

''Roger is very liked everywhere, especially here. ... But it didn't bother me,'' Cilic said. ''Obviously, in some situations, it can help him.''

In the next game, Cilic double-faulted to let Federer break for the first time, and soon the 17-time major champion was shaking his right fist, celebrating. Finally, a set belonged to him. Plenty of work remained: those match points in the fourth set, all on Federer's serve.

At 30-40 in the 10th game, a gutsy 104 mph second serve drew a long forehand return from Cilic.

At 30-40 in the 12th game, Federer conjured up a 120 mph ace.

And at 7-6 in the ensuing tiebreaker, Federer again didn't hold back on a second serve, this one at 108 mph, and Cilic flubbed a forehand return, this one into the net.

Five minutes later, Federer converted his fifth set point of the tiebreaker, when Cilic's forehand found the net. Suddenly, everything was even at two sets apiece, and while Cilic is 7 years younger, it was Federer who thrived as the match moved past the 3-hour mark, grabbing the last three games.

''This is a big one,'' Federer said. ''Probably not the biggest, but a big one.''


Follow Howard Fendrich on Twitter at http://twitter.com/HowardFendrich