Andy Murray went down in flames on the third and hottest day of the US Open, losing against Fernando Verdasco for only the second time in 15 matches. But he will leave New York encouraged to believe he may yet return to something like he was before injury threatened to end his career just over a year ago. If he does, it will be his greatest achievement.

The Spanish left-hander served Murray off the court at times, and hit 52 clean winners to win 7-5, 2-6, 6-4, 6-4 as the former world No 1 struggled to compensate for 46 unforced errors. Verdasco said courtside: “With Andy it’s always tough. He’s an unbelievable fighter, even with the injury.”

Midway through the third set of a match that was slipping from his weakening grasp, Murray heaved for breath on his chair and, bathed in ice from the towel wrapped around his reddening neck, looked more like a battered boxer on his stool between rounds than a father of two from Surrey earning his living at tennis.

When asked to compare the physical demands of the sports two nights previously, he smiled quizzically and shook his head; he was not smiling now.

When they retreated to the cool of the locker room – in keeping with the 10-minute heat break that was introduced at Flushing Meadows on Tuesday, and four years after Murray called for it during an even more brutal New York heatwave – Verdasco had taken the set to lead 2-1. He had reason to believe he was one set away from a third-round match against the 2009 champion, Juan Martín del Potro, who earlier saw off the American Denis Kudla in three sets.

Murray had other ideas. He threw everything he had left at his adversary. Even when broken for 3-4, and limping, you could almost hear his heart beating through his sweat‑drenched shirt. That he fell short was no disgrace. That he finished full of fight in a lost cause was almost a victory.

When they had begun three hours and 23 minutes earlier, the temperature was stuck at 36C, with 44% humidity, as the show court that resembles a bear pit dragged the combatants into its cloying embrace. A few years ago Murray would have welcomed the challenge, knowing his fitness would give him an edge. Post‑operation, he is less sure.

Fernando Verdasco was exasperated by Andy Murray but prevailed after four sets of sweat-drenched effort. Photograph: Robert Deutsch/USA Today Sports

Hitting more with his arms now rather than through his hips and torso, he sprayed a worryingly high number of ground strokes, especially on the forehand. His serve did not click, either. In between, there was much magic and grit.

Murray moved brightly in a confident start and a high point of the early exchanges was a 26-shot rally in the fourth game – the longest to date in the tournament – where his grinding instincts forced a long forehand out of an exasperated Verdasco, who had experienced many such moments in his 13 previous losses to the Scot. Murray broke for 4-2 and looked ready to rumble but, as has happened in the past, he handed it back straight away, passed at the net. It was not a day for wavering concentration.

Verdasco, one of the most dangerous left-handed servers in the game, needed a line-painting ace on the edge of the deuce side to save set point. But Murray served a double fault to gift him another break, and he sealed the set with a crunching forehand into the ad corner after just over an hour.

Disappointed with himself, Murray lifted his game noticeably to break for 3-1 in the second – and again he gave it back straight away. Verdasco caught the bug and a forehand wide cost him his own serve in the sixth game. He served a double fault for the sixth time to surrender the second set.

There was a perceptible mood shift early in the third as Murray, tiring, was unable to fight his predilection to play long points, ending up in no-man’s land, tactically. Verdasco, serving out of his skin, broke twice in 20 minutes. From nowhere, Murray found inspiration to break and hold for 3-4, then 4-5, as his blows began to land more heavily. But he dipped once more and Verdasco was off the court in a flash to make the most of the heat break – while Murray was still sitting on his chair. He was not happy.

A toxic mix of match rust and drained stamina had turned Murray’s features a weird pink after two and a half hours of gut-busting effort but his blood was raised also by the fact Verdasco had consulted with his team during the break, contravening the protocols.

Murray’s bigger challenge was to win two sets in a row with lactic acid threatening to drown the oxygen gurgling through his wearied limbs. He had not won a five-setter since beating Jo-Wilfried Tsonga in a Davis Cup match at Wimbledon in 2016. Indeed, he had lost four in a row since, the last one the cruellest, on one leg against Sam Querrey at the same place nearly 14 months.

Up 2-1 with serve in the fourth, he shouted to his team: “I need all your support.” Nobody has ever doubted Murray’s fighting spirit. From there to the end, he chased and scraped like a dog in a doomed argument with a 10-ton truck. Even as Verdasco served for the match, his racket trembling, Murray grabbed five break points and forced six deuces in a dozen minutes of drama, before the Spaniard converted his third match point.

On Court No 10, Britain’s charge was shredded to zero when the Serb Dusan Lajovic outlasted Cameron Norrie 6-2, 2-6, 6-4, 6-4. The British player lost his serve and the plot when he returned late from his third-set heat break.