Wimbledon: Roger Federer comes back from 2 sets down to beat Cilic in 5

Roger Federer of Switzerland celebrates at match point after beating Marin Cilic of Croatia in their men's singles match on day ten of the Wimbledon Tennis Championships in London, Wednesday, July 6, 2016.

LONDON — Roger Federer's bid for a record eighth Wimbledon title remains alive after he came from two sets down and saved three match points Wednesday before overcoming Marin Cilic in five sets, advancing to the semifinals at the All England Club for the 11th time.

Playing his best when he absolutely needed it most, the seven-time champion finished with his 27th ace to complete a 6-7 (4), 4-6, 6-3, 7-6 (9), 6-3 victory on Centre Court against the player who knocked him out in semifinals of the U.S. Open two years ago.

"I knew I was in so much trouble in the third, and then again in the fourth," he said. "I'm really, really pleased and just ecstatic I was able to come through somehow."

It was the 10th time in Federer's career that he has erased a two-set deficit to win in five sets. This was also his 80th match win at Wimbledon, which equals Jimmy Connors' record. Federer also matched Connors' record of reaching the Wimbledon semifinals 11 times.

What's more, Federer is now two wins away from the all-time record for Wimbledon men's titles. He's currently tied with Pete Sampras and 1880s player William Renshaw with seven.

Querrey had knocked out No. 1 Novak Djokovic in the third round on Saturday, but came up short in his bid to become the first American to make it to the semifinals of a Grand Slam since Andy Roddick reached the final four at Wimbledon in 2009.

The 34-year-old Federer will now play in his 40th Grand Slam semifinal. He's the oldest man to get this far at Wimbledon since Ken Rosewall finished runner-up in 1974 at the age of 39. If Federer wins the title, he'll become the oldest men's Wimbledon champion in the Open era.

The third-seeded Federer looked down and out after falling behind two sets to love against No. 9 Cilic, a 6-foot-6 (1.98-meter) Croatian who kept holding serve, attacking on returns and dominating rallies with his big forehand and two-handed backhand.

It seemed like a replay of their last meeting, when Cilic swept Federer in straight sets in the semifinals en route to the 2014 U.S. Open title.

"I wasn't seeing his serves anymore," Federer said. "Next thing you know you're down two sets to love on grass. I thought he was playing very well, U.S. Open-esque. On the return he was reading my serve. On the serve, I couldn't read his serve."

But Federer gradually worked his way back into the match, breaking for the first time to go up 5-3 in the third, saving three match points in the fourth, and playing flowing grass-court tennis on his favorite stage.

After ripping an ace on match point, Federer wagged an index finger in the air to show who was No. 1. He walked off to a standing ovation from an adoring crowd that helped will him to victory.

"It wasn't going well for me, so for me it was about staying in the match," Federer said. "Somehow I hoped for his level to drop maybe a little bit, and get a little bit lucky. That's exactly what happened."

He cited a key point in the third set, at 3-3, love-40 on his serve, facing three break points.

"I have to pick up a half-volley," Federer said. "I mean it could go in the stands. It stays in. Next thing you know it's like you're still in the match and you can turn it around."

Federer held serve for 4-3, then broke in the next game, with Cilic double-faulting on break point. The momentum had changed.

In the fourth set, Cilic had more chances to put Federer away but couldn't. Federer saved two break points at 2-2, hitting three straight aces and a service winner to finish the game.

Cilic then earned his first match point with Federer serving at 5-4, but hit a forehand return long. Another match point came at 6-5, and Federer responded with a 120 mph ace.

Match point No. 3 came at 7-6 in the tiebreaker. Cilic failed to take advantage of Federer's second serve, hitting another forehand return into the net.