Top seed Rafael Nadal was made to work hard before finally breaking the resistance of world number 93 Teymuraz Gabashvili to book his place in the second round of the US Open.
Nadal won in straight sets on Arthur Ashe Stadium at Flushing Meadows, but it took until the seventh game of the third set for him to break Gabashvili's serve.
The world number one, who needs to win the title in New York on September 12 to complete a career Grand Slam, eventually broke a gallant Gabashvili again to seal a 7-6 (7/4) 7-6 (7/4) 6-3 victory in two hours and 57 minutes.
"It was a very tough match tonight," conceded Nadal, who had dropped just 11 games in his previous two wins against his Russian opponent.
"My serve tonight worked well and hopefully I can continue like this. It's not my best shot but I always try hard to keep improving.
"I know if I want to have chances to win here, this year or any year, I need to serve really well and that's one thing I am focusing on."
Earlier in the day, Novak Djokovic was forced to come back from the brink of defeat to also advance to the next round.
Djokovic trailed two sets to one and saved a break point in the fourth set to avoid going a double-break down before rallying to beat Serbian Davis Cup team-mate Viktor Troicki 6-3 3-6 2-6 7-5 6-3 in three hours 40 minutes.
The number three seed, who often has breathing difficulties in hot weather, understandably struggled as the temperature in New York approached 100 degrees, but dug deep to improve his career five-set record to 11-5.
Asked about finally getting some shade on the Arthur Ashe Stadium in the fifth set, Djokovic said: "Oh my God, it was a sleeping with my girlfriend kind of feeling!
"Somebody from the stands kept on saying 'Hold on and try to hang in there' and that's exactly what I did. I would like to thank my box for staying all the time with me and supporting me all the way through and the fans for making the match so exciting.
"I have to give Viktor credit, he played really well and served incredibly well. If I lost it would have been so deserved on his side. Only a couple of points turned the match around."
Marcos Baghdatis became the biggest casualty of the US Open so far, the 16th seed losing in five sets to veteran Frenchman Arnaud Clement.
Clement, 32, recovered from two sets to one down to secure a 6-3 2-6 1-6 6-4 7-5 victory in sweltering heat on the Louis Armstrong court at Flushing Meadows.
"What can I say? I was really heavy on court, I wasn't feeling very fit," admitted Baghdatis, who was a runner-up at the Australian Open in 2006 but has never been beyond the second round in New York.
"I couldn't play aggressive. I was really defensive today and Arnaud played a very good first set. I didn't play very good tennis and he won the match."
Latvia's Ernests Gulbis was another seed to fall, the 24th seed losing in straight sets to France's Jeremy Chardy, but eighth seed Fernando Verdasco came through in five sets against Fabio Fognini of Italy, while 31st seed David Nalbandian also needed five sets to see off South African qualifier Rik de Voest.