Last updated on .From the section Tennis

Roger Federer had been seeking his sixth US Open title

US Open 2019 Venue: Flushing Meadows, New York Dates: 26 Aug - 8 Sep Coverage: Live text and radio commentary on selected matches on the BBC Sport website and app

Five-time champion Roger Federer is out of the US Open after Bulgaria's Grigor Dimitrov won a late-night thriller to finally beat the Swiss great.

Federer, 38, had won all seven of their previous meetings but unseeded Dimitrov fought back to win 3-6 6-4 3-6 6-4 6-2.

Federer, who needed treatment for a back injury in the latter stages, said: "I felt it the whole time, but I was able to play."

Dimitrov, 28, faces Russian fifth seed Daniil Medvedev in the last four.

"Clearly in the end he was not at his best. I used every opportunity I had," said the Bulgarian.

World number 78 Dimitrov's shock win ensured there will be at least one first-time Grand Slam finalist on Sunday.

Third seed Federer, who lost to Australian John Millman in the last 16 last year, has now been knocked out of the US Open by players ranked outside of the world's top 50 for the second successive year - after never previously having lost to one at Flushing Meadows.

Afterwards, the 20-time Grand Slam champion said he was struggling with the back problem throughout the match.

"I feel low. I'm disappointed it is over because I feel as I though I was playing well," Federer said.

"It is a missed opportunity. I thought if I could get through I'd have two days off after."

Federer's exit leaves long-time rival Rafael Nadal as the strong favourite to lift the trophy, with defending champion Novak Djokovic also out after retiring injured from his last-16 match against Stan Wawrinka on Sunday.

Spanish second seed Nadal, a three-time US Open champion, faces Argentine 20th seed Diego Schwartzman in their quarter-final on Wednesday.

But it is clearly a golden opportunity for 33-year-old Nadal to win his 19th Grand Slam title and narrow the gap on Federer in the race to be regarded as the greatest men's player of all time.

Federer's loss also ended the possibility of the illustrious pair, rather remarkably, meeting at the US Open for the first time in their enduring rivalry.

'Baby Fed' comes good

Dimitrov is the lowest-ranked Grand Slam semi-finalist since Rainer Schuettler at Wimbledon in 2008

Dimitrov, whose career has stalled spectacularly in the past two years, was not expected to be the man to prevent a 'Fedal' final from happening.

Nicknamed 'Baby Fed' in the early days of his professional career because of his technique, the Bulgarian was once heralded as the man who might succeed the Swiss as the leading player in the men's game.

But he has tumbled down the ATP rankings since reaching a career-high ranking of three in November 2017, with a shoulder injury derailing his season this year and forcing him to withdraw from four tournaments.

Coming into the final Grand Slam of the season Dimitrov had lost seven of his previous eight matches, including a chastening defeat by world number 405 Kevin King in Atlanta.

However, the 2017 World Tour Finals champion has suddenly rediscovered his form at Flushing Meadows to devastating effect.

"I think the past six, seven months have been pretty rough for me," he said.

"It was that low that I don't even want to go there any more. It was just obviously injury, losing points, ranking. That's the lowest point of any player.

"I kept on believing again in the work, the rehab I had to put behind my shoulder, the exercise, the practice. There were so many things I had to adjust.

"Next thing, you're almost end of the year, you have a result like that. It's pretty special to me."

Dimitrov bounced back from losing the first set against Federer with ferocious forehands which rocked the Swiss and helped him level the match.

Despite falling behind for a second time, Dimitrov managed to retain belief and dragged his long-time foe into some physically-draining points in the fourth set.

Having broken in the opening game, Dimitrov pushed for a 5-2 lead in a remarkable eighth game where Federer fought off seven break points to eventually hold.

Federer then had five chances of his own to break back in another marathon game before Dimitrov served out to take the match into a decider, the Swiss then taking a 10-minute medical time-out in a bid to ease his back injury.

That did not alleviate the problem, however, Dimitrov taking full advantage to win a match ending at 23:46 local time after three hours and 12 minutes.