Rafael Nadal, a veteran of big nights and spectacular wins, will play the 31-year-old South African debutant Kevin Anderson in the final of the US Open on Sunday after a commanding four-set win over Juan Martín del Potro on Friday night.

The two-time champion took two and a half hours to win 4-6, 6-0, 6-3, 6-2, and told fans on Arthur Ashe Court, “After a couple of years with injuries, some troubles, a very emotional time, it is amazing to be back, very important for me. I played a couple of matches so-so, but the last three matches have been very positive, and this one was the best one for me. I have the passion to play with full energy, and to come back here many years.”

Earlier, Anderson continued his outstanding run here by beating the in-form Spaniard Pablo Carreño Busta 4-6, 7-5, 6-3, 6-4 in just under three hours.

Nadal said of Anderson, “He is a huge player, with an unbelievable serve. And he plays so well on this surface. He had some injuries but was able to get back and play the best tennis of his career. I have known him since we were 12 years old. It’s great to see him in the final.”

In trying to reach it Nadal was the first to crack, in the fifth game, and Del Potro consolidated on his booming serve – which was hitting the spot with ominous accuracy and speed – to tighten his grip on the set.

The last time Nadal lost in the semi-final of a slam was here in 2009 – to Del Potro. Since then, he has progressed to the final 15 times when reaching the penultimate round at the big four events. That is some record. Eight years ago, their match lasted a reasonably short two hours and 20 minutes, and Del Potro allowed Nadal just six games, before going on to beat Roger Federer in the final. The Spaniard had caught Del Potro at his nascent best.

Here, Del Potro was attempting that rare back-to-back double over that pair of modern greats but the other way around – and he was doing it on slower legs whilst carrying the weight of the physical baggage he’s been burdened with following his struggles with injury in recent years.

Five players have beaten those two enduring maestros in the same tournament, but only Del Potro and Novak Djokovic have done it in a slam. The others are Andy Murray, in Toronto seven years ago, David Nalbandian and Nikolay Davydenko. Djokovic had by some way the greatest slam strike rate against them. He did it in Montreal in 2007, Indian Wells and here in 2011, at the 2013 ATP World Tour Finals in London, and there again two years ago.

It is a pity Djokovic, runner-up here last year, was unable to finish his season, and it looks as if Murray will not be back until next year either, along with the 2016 US Open champion, Stan Wawrinka. What a brutal game this is.

History favoured Del Potro in more ways than one: Nadal is only 5-8 here when losing the first set. But history can make a fool of the wisest man.

There were other distractions: on the fourth point of the 10th game, a ballboy, to much jeering and cheering, went to retrieve a stray moth on the court – and completed the task by putting his foot on it. Three points later, Del Potro metaphorically did the same to Nadal, driving a perfect forehand into the ad corner to take the set after 50 minutes.

Nadal’s uncle, Toni, who is in his last slam as his coach, told ESPN courtside before the start of the second set, “Our forehand is not enough good [to Del Potro’s backhand]. In my opinion, Rafa has to give more power in every shot, and go some times to the net. He has got to [attack] the ball more. He is giving it too much spin.”

As Nadal said later, “I was not playing bad in the first set but too much against his backhand. He was waiting for me there. At the beginning of the second I moved him, was a little bit more unpredictable.”

Nadal did have more obvious intent behind his serve when they resumed. The challenge for Del Potro was to continue hitting his rediscovered backhand (it came properly to life for the first time here against Federer) with full force. Since his wrist surgeries that has been his glaring weakness, although he compensated by developing an top-class slice.

However, Del Potro’s first double fault gave Nadal encouragement in the second game, and, helped by an idiot in the crowd who shouted out mid-serve, he broke to begin a withering stretch of dominance.

From 3-0 up, Nadal was invigorated and bright-eyed again. Uncle Toni’s message had got through, perhaps by telepathy. He had soaked up four aces and had come back with three of his own. This was whizzbang tennis of the highest order.

Del Potro pretty much realised the second set was gone, and went for the lines without caution – not that it did him any good. Nadal was rushing through the points and he bageled his woebegone opponent, who won only eight points in the set, one of them an ace.

In his extraordinary win over Dominic Thiem in the fourth round, Del Potro won only three games in the first two sets. Here, he at least was level in sets after an hour and 17 minutes, but he did not look in great shape against a rampant Nadal, whose serve and demeanour had simultaneously sharpened up considerably. When Del Potro summoned enough energy to stop the rot at nine games in a row, he looked exhausted.

He put a peanut in front of the landslide in the eighth game when Nadal dumped the simplest of volleys into the net for break point, then hit long for 5-3, but, after two hours, Nadal was 2-1 up and coasting.

Del Potro built on his third-set fightback, but Nadal was too far ahead and too focused. He applied mental pressure like a tourniquet on a bleeding carcass and raced to the end in just over half an hour, getting the job done with a fierce, short-arm jab down the line with Del Potro stranded at the net.