Andy Murray was in danger of experiencing his earliest exit from a major tournament this year.
The Englishman found himself even with highly motivated Paolo Lorenzi after two sets but was able to refocus and eventually restore order in a 7-6 (4), 5-7, 6-2, 6-3 victory on Saturday to reach the round of 16 at the U.S. Open at Arthur Ashe Stadium in New York.
The second-seeded Murray is bidding to become just the fourth man in the Open era to reach all four major finals in a calendar year. He kept that quest alive with the 3-hour, 17-minute battle in which he was severely pushed by the 34-year-old Italian.
Murray will face 22nd-seeded Grigor Dimitrov of Bulgaria, who defeated Portugal's Joao Sousa 6-4, 6-1, 3-6, 6-2.
"It will be a tough match," Murray said in a courtside interview. "Grigor has been playing well the last few weeks. He's a tough player, moves well. Got a lot of good shots. Very talented guy. Hopefully I play a good match -- I'll need to if I want to win."
Murray was pushed to a tiebreaker while winning the first set against Lorenzi and then lost the second. Lorenzi appeared to tire as Murray rolled through the third set and finished the match with 60 winners.
Third-seeded Stan Wawrinka could relate to Murray's plight as he was pushed to five sets before prevailing against Great Britain's Daniel Evans. The Switzerland native won 4-6, 6-3, 6-7 (6), 7-6 (8), 6-2.
Wawrinka was close to being sent home in the fourth set before being able to fend off the charge of Evans and win the tiebreaker. He then breezed through the final set to advance.
Next up for Wawrinka is a surprise meeting with Illya Marchenko. The 63rd-ranked Ukrainian advanced when his third-round opponent, 14th-seeded Nick Kyrgios of Australia, retired due to a right hip injury.
Marchenko was in front 4-6, 6-4, 6-1 when Kyrgios finally decided he couldn't proceed due to a the injury he incurred in the first set.
"I'm really sorry for Nick. I didn't want to win this way," Marchenko said.
Kyrgios said, "It's tough. I don't like to retire. It's probably like the second or third time I've done it. It's never easy, of course. I've got a lot of belief in my game to still win matches when I'm not feeling great."
The Argentina native recently returned from left wrist injuries that have plagued him since 2013 -- he has undergone three surgeries -- but he had no issues while registering the 7-6 (3), 6-2, 6-3 victory over Ferrer in a 2-hour, 24-minute match.
"I got stronger mentally after the first set," del Potro said afterward. "Against David you never know when the match is going to finish. He never gives up. It's a pleasure to play against him because he puts me under pressure all the time. I needed to play my best tennis today."
In other matches, sixth-seeded Kei Nishikori of Japan advanced with a 4-6, 6-1, 6-2, 6-2 victory over France's Nicolas Mahut, and eighth-seeded Dominic Thiem of Austria posted a 1-6, 6-4, 6-4, 7-5 win over Spain's Pablo Carreno Busta.
Croatia's Ivo Karlovic, the 21st seed, knocked out American teenager Jared Donaldson 6-4, 7-6 (3), 6-3. Donaldson earned his first two Grand Slam victories this week, while Karlovic, 37, moves on to become the oldest man in the U.S. Open fourth round since Jimmy Connors' 1991 run to the semifinals at age 39.