New York (CNN) When Novak Djokovic beat Roger Federer in their titanic Wimbledon final, he moved to within four majors of the Swiss' 20 for the first time.

Federer could have someone even closer to him by the time the US Open ends.

If pal and sporting rival Rafael Nadal defeats 23-year-old upstart Daniil Medvedev, he would get to 19 majors and close to within one of Federer for the first time.

It would tie him with the top-ranked Djokovic on two majors in 2019, and few would have forecast that after Nadal was crushed by the Serb in the Australian Open final, then slumped — by his unprecedented standards — early on his preferred surface of clay.

He ended the clay swing by winning a 12th French Open title, though, and the Spaniard indeed won't have to face either of his two toughest rivals, Federer or Djokovic, on Sunday after back and shoulder injuries surfaced in their defeats to Grigor Dimitrov and Stan Wawrinka, respectively, this week.

That's ironic, since of the Big Three, it's Nadal whose body has let him down the most, especially his tender knees. A knee injury forced Nadal to retire just last year in the semifinals here against Juan Martin del Potro.

Rafa Nadal will face Daniil Medvedev on Sunday in the men's singles final!#USOpen pic.twitter.com/sUjehAr4HB — US Open Tennis (@usopen) September 7, 2019

"Of course, I would love to be the one who achieves more grand slams, but I still sleep very well without being the one who have more grand slams," Nadal told reporters.

"I am happy about my career. I am very happy about what I'm doing. I'm going to keep working hard to try to produce chances. Sunday is one. It's just one more chance, that's all. My opponents are going to keep playing. If I'm able to win on Sunday, okay, will be amazing. If I lose, I hope to keep having chances in the future to add things.

"But as I always say to you, and is true: I would love to be the one to have more, yes, but you cannot be all day frustrated or all day thinking about what your neighbor has better than you. You have to be happy with yourself."

Both Nadal and Medvedev advanced in straight sets under the Arthur Ashe Stadium roof on a wet New York day. Nadal got the better of Italian 24th seed Matteo Berrettini 7-6 (6), 6-4, 6-1 after Medvedev overcame rejuvenated Bulgarian Grigor Dimitrov 7-6 (5), 6-4, 6-3.

Winning tight first sets proved pivotal for the victors, especially since their opponents held the upper hand. The big-serving Berrettini led the tiebreak 4-0 and had two set points at 6-4, while Dimitrov held a set point on the Medvedev serve at 5-6 before the tiebreak.

Imposing record

Nadal's record against first-time grand slam finalists doesn't bode well for Medvedev: 5-1.

The one he lost? To Wawrinka in the 2014 Australian Open final, when the now 33-year-old suffered a back injury in the warmup.

Barring an injury, it's difficult to see fifth-seeded Medvedev — a lanky baseliner who can defend with the best of them and crush 130 mile-per-hour serves to boot — bucking the trend.

Sure, the Russian has made finals in Washington, Canada, Cincinnati and now the US Open — only luminaries Andre Agassi and Ivan Lendl have done that before in the Open Era in the same season — but he was crushed by Nadal 6-3, 6-0 in the final in Canada.

He has also had a draining fortnight in New York, never previously making a grand slam quarterfinal.

JUST WATCHED Will Nadal pass Federer for grand slam wins? Replay More Videos ... MUST WATCH Will Nadal pass Federer for grand slam wins? 03:52

Cramps, a shoulder injury, abductor problem and quadricep complaint have all arose, and now he gets warrior Nadal.

"Talking about Rafa, it's tough to find words," Medvedev told reporters. "So many players and so many people found them before me. He's one of the greatest champions in the history of our sport.

"He's just a machine, a beast on the court. The energy he's showing is just amazing.

"To play him in your first grand slam final should be, I want to say, a funny thing. It's not going to be a funny thing, but it's going to be an amazing thing to live."

A recent meeting

Medvedev, the leader of a young, talented Russian trio that includes Andrey Rublev and Karen Khachanov, said the recent clash with lefty Nadal could help him, as demoralizing as it was.

"His energy was much higher than mine," said Medvedev, who has made a habit of beating left-handers this tournament. "He kind of, I would say, (ate) me on the court because the start was kind of similar.

"I had one break point, then he got a break, but I only lost with one break. Then he was only going harder, harder, faster, stronger, and I was only going down.

"It's great that I have this experience playing him in the final of a Masters. I know what to expect. I know how to prepare for it."

When they met at the Rogers Cup in August, Rafael Nadal beat Daniil Medvedev.

That might not mean a different outcome.

If Nadal has benefited from a smooth path to the finale, Medvedev's road to the last stage could have been tougher on paper, too. Nadal will be the first top-20 player he will have encountered.

Nadal figures to be the heavy crowd favorite at the start of the match, after Medvedev drew the ire of New Yorkers by snatching a towel from a ball person, giving fans the middle finger and trolling them in an interview following a third-round win over Feliciano Lopez.

The incidents came three years after he was defaulted from a second-tier Challenger for making a racist remark and two years after he collected a fine at Wimbledon for throwing coins toward the chair umpire following a defeat.

Turning the crowd around

Medvedev, however, hasn't put a foot wrong in recent rounds and received a nice ovation after defeating Dimitrov.

"I can only say I'm a really calm person in life," said Medvedev. "I actually have no idea why the demons go out when I play tennis.

"Especially when I was a junior, I had a lot of problems with my attitude. I was not getting defaulted, but ... to have a game penalty was easy.

"I was working hard because every time I do something wrong on the court, I'm sitting with myself, 'I'm not like this in normal life. Why does it happen?' I don't want it to happen like this.

"So, I have been working a lot on it, and I have improved a lot. Sometimes it still happens. But talking about normal life, to make me angry, you need to do something crazy for one week in a row."

Something crazy might need to happen for Nadal to leave New York without a 19th grand slam title.