NEW YORK — On the one end, this farewell felt uncommonly blah. A fifth set sagged. Points shortened. Roger Federer’s returns sprayed and clunked. His volleys died. Suspense fled. He congratulated his friend on winning, went to his chair, removed his headband as throngs descended to photograph him a last time this year, got his things, departed another U.S. Open, spun around to wave and give a thumbs up, and disappeared Tuesday around 13 minutes to midnight.

The tournament seemed to sigh. It will not get the Federer-Rafael Nadal final that bubbled in its daydreams.

On the other end, a precipitous comeback continued, strangely enough. A 28-year-old man figured out some things to raise his record against Federer to 1-7. Grigor Dimitrov, of all people, surged to a fresh and eccentric semifinal with Daniil Medvedev by outlasting Federer, 3-6, 6-4, 3-6, 6-4, 6-2. In one of those moments when the lightbulb goes on and signals athletic breakthrough, Dimitrov said, “I was more present, to be honest. I was more of myself throughout every point, every game that I played.”

So on the gloomy side Federer, having exited in an injury timeout before the fifth set, said, “Yeah, but this is Grigor’s moment and not my body’s moment, so . . . It’s okay.” He would mention something about his upper back and neck. His lifelessness in the fifth set would suggest something restrictive.

And on the giddy side Federer’s friend and sometime practice partner, Dimitrov, joined the list of those who have left the Arthur Ashe Stadium fans bummed during Federer’s 11 years without a title here. They are names like Juan Martin del Potro (twice), Novak Djokovic (thrice), Tomas Berdych, Tommy Robredo, John Millman.

Grigor Dimitrov? He came here at No. 78 after spending about six years entirely in the top 40, a big chunk of that in the top 20 and the cusp of 2017 and 2018 way, way up at No. 3. He got to New Year’s Day 2019 at No. 19, yet hit a nadir in July in Atlanta with a 7-5, 6-4 loss to Kevin King, an Atlantan who can play tennis better than much of the planet yet ranked No. 405 as he played Dimitrov.

“Yeah, it was not a pretty time. I’m not going to lie,” Dimitrov said from his happy seat as a Grand Slam semifinalist for the third time, following upon gutty efforts against Djokovic in the 2014 Wimbledon semifinals (four sets) and Nadal in the 2017 Australian Open semifinals (five sets). “It was that low that I don’t even want to go there anymore. I was just obviously injury, losing points, ranking. That’s the lowest point of any player.”

It was low, low, low enough that he turned up here forgotten, beat No. 77 Andreas Seppi, got a walkover when No. 12 Borna Coric withdrew, beat No. 94 Kamil Majchrzak, beat the rising Australian No. 38 Alex de Minaur, and turned up opposite Federer.

Federer had lost sets in each of his first two matches, but had blazed through No. 58 Daniel Evans and No. 15 David Goffin in hasty, go-for-a-beer-and-miss-half-of-it matches. Then on a strange night — really? — he wound up saying, “It’s just a missed opportunity to some extent that you’re in the lead, you can get through, you have two days off after. It was looking good. But got to take the losses. They’re part of the game. Looking forward to family time and all that stuff, so . . . Life’s all right.”

It’s a missed opportunity in that No. 1 Djokovic had already retired mid-match and left 48 hours earlier, leaving Stanislas Wawrinka as the winner and refurbished bulwark. Only now Wawrinka couldn’t solve the hottest player of the summer, the overworked Medvedev, losing 7-6 (8-6), 6-3, 3-6, 6-1, and now the U.S. Open has a semifinal without any of the sport’s big three.

It has this because Federer made 61 unforced errors to Dimitrov’s 41, and because Federer converted just four of 14 break points, and because Federer lost his service in the first games of both the fourth and fifth sets, and because it all looked so peculiar. “Start of the fourth wasn’t ideal. Start of the fifth wasn’t ideal. That was running behind,” Federer said, as if his body language hadn’t said it before.

Still, they tangled in two fourth-set games chockablock with twists. With Federer serving at 2-4, they played a 22-point behemoth with eight deuces and seven break points for Dimitrov, all lost. Federer held on there, but Dimitrov would say later, “I think even when I lost that game, I was actually smiling going through the changeover because I was, ‘That game must have hurt him a lot.’ For me, it actually lifted me up.”

After all, he said, “One of the only things for me was try to keep him as much as possible on the court. I did that very well.”

Then, with Dimitrov serving for the set at 5-4, they played another doozy. Dimitrov slid behind love-40. Federer held five break points in all. Dimitrov beat those back with a 111-mph service winner, a 124-mph ace, an inside-out forehand straight from heaven to the open court, a Federer error when he seemed to go for too much with a backhand up the line, and a netted Federer backhand. On the first set point going the other way, Federer lifted a forehand long, and shortly after 11 p.m., the crowd had a fifth set it didn’t necessarily want but seemed primed to enjoy. It would be Federer in a fifth set, a province he knows well here and everywhere.

Everything careened awkwardly from there. Federer went to the trainer and returned. He fell behind 4-0, giving the sight and sound of a dissipating crowd trying to use a few loud voices to lift a beloved 20-time Grand Slam champion. Of the 17 points Dimitrov served in the fifth set, Federer got one.

So, gone again, Federer wound up saying of Dimitrov, “I thought he was tough off the baseline. He mixed up well, which gave me all sorts of problems with the rhythm. Could never really feel comfortable off the baseline. That’s something in the past I’ve always been able to dominate, I’d say. That was not the case tonight. He did a good job there.”

And Dimitrov would say of Federer, that in addition to all the other talents and qualities, “I think one of the best qualities I’ve always admired in him is moving on. Doesn’t matter what kind of point he’s playing, winning, losing, he just moves on. That’s a hell of a quality to have.”

So again, he moves on.