NEW YORK -- Third-seeded Roger Federer was upset by Grigor Dimitrov in five sets in the quarterfinals. Dimitrov, ranked 78th, earned the biggest upset of his career with the 3-6, 6-4, 3-6, 6-4, 6-2 victory. Dimitrov had never beaten Federer in their seven previous meetings.

Dimitrov, once ranked No. 3 in the world, entered this year's US Open in the midst of one of the worst slumps of his career. He'll now play in the third semifinal match of his career, having previously reached the semis at the Australian Open (2017) and Wimbledon (2014). Dimitrov, 28, will face Daniil Medvedev on Friday.

Federer, who holds the all-time record for most Grand Slam singles titles with 20, will end his Grand Slam season with back-to-back five-set losses. He fell to Novak Djokovic in the Wimbledon final in July.

Federer, 38, took an injury timeout for a back issue before the start of the final set. After shaky starts in his first two US Open rounds this year, in which he dropped the first set in each match, Federer appeared to have regained form during his third- and fourth-round matches.

This year's tournament has also featured the upsets of both the men's and women's No. 1 seeds in singles. Novak Djokovic retired because of a shoulder injury on Sunday while Naomi Osaka lost in straight sets on Monday.