Russian fifth seed Daniil Medvedev advanced to his first Grand Slam final on Friday by defeating Bulgaria’s 78th-ranked Grigor Dimitrov 7-6 (7/5), 6-4, 6-3 at the US Open.

Medvedev will play in Sunday’s championship match at Arthur Ashe Stadium against the winner of a later semi-final between Italian 24th seed Matteo Berrettini and 18-time Grand Slam champion Rafael Nadal.

“Finally I’m here after three sets,” Medvedev said. “I’m just happy to be in the final.”

If second-seeded Nadal can capture his fourth US Open crown on Sunday, he would move one shy of matching Roger Federer’s all-time men’s record for Grand Slam titles.

The 33-year-old Spaniard would also draw to within one of the Open-era record of five US Open titles shared by Roger Federer, Pete Sampras and Jimmy Connors.

Nadal beat Medvedev in last month’s Montreal final in their only meeting, then skipped Cincinnati, where Medvedev won the title.

Medvedev, now 20-2 in the four North American events, beat Berrettini last year at Indian Wells in their only matchup.

“When I was going to USA, I didn’t know it was going to be this good,” Medvedev said. “So I have to say I love USA.”

Medvedev is the first Russian in a Grand Slam final since Marat Safin won the 2005 Australian Open title and the first Russian to reach the US Open final since Safin won the 2000 crown.

At 23, Medvedev is just the third men’s Grand Slam finalist born in the 1990s after Canada’s Milos Raonic and Austria’s Dominic Thiem. He could become the first ‘90s-born Slam winner.

Medvedev is only the third Open Era player to reach finals in Washington, Canada, Cincinnati and the US Open in the same year after Ivan Lendl in 1982 and Andre Agassi in 1995.

Dimitrov, who lost seven of his eight matches just prior to arriving at Flushing Meadows, would have been the lowest-ranked US Open men’s finalist since the rankings began in 1973.

“Good match overall. I think it was just a few points here and there,” Dimitrov said. “Yeah, three sets to love, but the score for me doesn’t justify the match itself. I think it was a good level. Overall he played really well, fought hard, a lot of the key points he played well. So I don’t want to be too down on myself.”

The Bulgarian was the lowest-ranked Slam semi-finalist in 11 years and the lowest at the US Open since 174th-ranked Connors in 1991.

US Open fans gave solid applause to Medvedev. They had booed Medvedev in the third and fourth rounds after he flashed an obscene gesture and later taunted them, saying he thrived on their jeers for the energy to win. He later apologized.

Medvedev took the tie-break after Dimitrov won after Dimitrov netted a forehand and sent another long on the last two points.

They exchanged breaks to open the second set and again in the fourth and fifth games but Dimitrov netted a backhand to surrender a break and the set in the 10th game.

Medvedev broke for a 3-1 lead in the third set and held to the finish, which came on a service winner after two hours and 38 minutes.