And the Swiss threatened early in the contest at the 02 Arena against Cilic when he carved out two break points in the Croatian’s opening service game.
But Cilic held and he fought off two more during the course of the set which went into a tiebreak.
At 5-5 in the shootout on Federer’s serve, Cilic stretched to connect with a backhand volley. The ball crept over the net and bounced away for a winner.
Cilic converted his set point to claim the opener after 53 minutes.
He had one chance to break Federer’s serve early in the second set but could not capitalise and after dropping only four points on his own serve during the set, he promptly squandered four in one game to gift Federer the second 6-4.
“We’ve seen it so many times here at this tournament that when you miss a few opportunities you can really pay the price,” said Federer. “We’ve seen swings of momentum in a lot of the matches so far.
“At the start of the first set maybe I was a little bit over aggressive on some crucial points rather than being patient. But I was able to turn that around late in the second set and I just had a much better feeling in the third set.”
Federer won the first three games of the decider and though Cilic got on the board to trail 3-1, that was as it. Federer took the next three games to reach the semis unbeaten for the 10th time in 15 appearances at the tournament.
“Maybe Marin’s level dropped a bit towards the end," added Federer. "But at one point it was dangerous for me. I was down a set and facing a break point.”
His recovery condemned Cilic to his third defeat of the tournament. In his loss to Alex Zverev in the their opening game, Cilic was a break up in the final set. And it was the same scenario in his tie against Jack Sock.
“Mentally it is tough knowing that I have had two losses already and that I’m not going to be able to go through to the semis,” said Cilic. “It was a solid match for me against Roger. I played the first two sets at a really good level and even had a chance to break Roger’s serve.
“But once he got the break in the third, he was playing a little bit more relaxed and he played well. Despite the three losses I feel there are positives. I’ll go away to recover and start the new season at a good level.”
Federer’s year, in which he has claimed an 18th and 19th Grand Slam title as well as five other crowns, will continue on Saturday against the runner-up from the Pete Sampras group. That will be decided on Friday when fourth seed Dominic Thiem takes on the seventh seed David Goffin.