NEW YORK -- Down a set in the first round of the U.S. Open, Maria Sharapova sat in her changeover chair, briefly closed her eyes, and took some deep breaths.

"I knew," she would say later, "that it wasn't over."

Whatever problems she encountered Tuesday, whatever the level of her game, all that mattered to Sharapova was the outcome. Overcoming a deficit and a big-hitting opponent to avoid a significant upset, the 2006 U.S. Open champion put together a 4-6, 6-3, 6-1 victory over 60th-ranked Jarmila Groth of Australia.

"At the end of the day, even though I know I wasn't playing my best tennis, I know I came out with a win. And sometimes it's more important than anything, because you're giving yourself a chance to go out on the practice court tomorrow," the 14th- seeded Sharapova said.

Groth hit 14 double-faults, including on the final point of the second set. She was by far the more aggressive of the two, taking risks that sometimes paid off and sometimes did not. She hit 24 winners to 19 for Sharapova, but made 48 unforced errors to 17 for Sharapova.

There was a lot of hanging in there on a steamy Day 2 at the U.S. Open, when the temperature rose into the mid-90s in the afternoon, prompting the tournament to invoke its "extreme weather policy" for women's singles matches, which allows players to request a 10-minute break after the second set. More than a dozen women's matches went three sets, and seven men's matches lasted the full five sets, including 2007 runner-up Novak Djokovic's 6-3, 3-6, 2-6, 7-5, 6-3 victory over his friend and Serbian Davis Cup teammate Viktor Troicki.

Top-seeded Rafael Nadal found himself in a surprisingly competitive match but still won in straight sets, getting past 93rd-ranked Teymuraz Gabashvili 7-6 (4), 7-6 (4), 6-3 at night. There were only two breaks of serve -- both by Nadal, the last two times Gabashvili served under the lights.

"My serve worked well," said Nadal, who saved the only break point he faced.

Under a sizzling sun earlier, Djokovic and Troicki played for more than 3 1/2 hours, and the on-court temperature approached 110 degrees. Djokovic was down a break in the fourth set while already trailing, before righting himself.

Mardy Fish, an American seeded 19th, also won in five sets, but fan favorite James Blake needed only three to reach the second round.

Sharapova never has lost earlier than the second round in seven U.S. Opens. But she also hasn't made it past the third round since taking the championship. She lost at that stage in 2007 and 2009, and missed the tournament in 2008 shortly before having right shoulder surgery.

Sharapova made adjustments to her service motion after that operation, then missed nearly two months this season with a right elbow injury. But she has seemed lately to be on her way back to being a contender at the biggest tournaments, reaching the finals at two hard-court tournaments this summer.

She only double-faulted twice Tuesday, and it was Groth who donated points with shaky serving, including on the last point of the second set.

"Maybe if I would have served differently," Groth said, "everything would be easier."

Sharapova-Groth was the day's third match in Arthur Ashe Stadium that went the full number of sets, making for a night session that started about 1 1/2 hours later than the 7 p.m. schedule. So Nadal's match didn't end until shortly after 11:30 p.m., and then the top-seeded woman, Caroline Wozniacki, still had to head out on court.

Earlier, No. 4-seeded Jelena Jankovic, like Sharapova, needed to turn things around after losing the first set. Jankovic, the runner-up at the 2008 U.S. Open, managed to get past 18-year-old Simona Halep of Romania 4-6, 6-4, 7-5. Jankovic was two points from defeat at 5-4 in the third set before taking the last three games to close out the match.

Svetlana Kuznetsova, the 2004 U.S. Open champion, needed three sets, too, before eliminating 39-year-old Kimiko Date Krumm.

Wozniacki, last year's runner-up in New York, and Jankovic both have a chance to overtake Serena Williams at No. 1 in the rankings by winning the title.

Next for Jankovic comes a matchup against Mirjana Lucic, who beat Alicia Molik 7-6 (5), 6-1 to win a U.S. Open match for the first time in 11 years.

The first seeded woman to exit was No. 8 Li Na, who lost to Kateryna Bondarenko 2-6, 6-4, 6-2, and she soon was followed by No. 26 Lucie Safarova and No. 30 Yaroslava Shvedova. Winners included Wimbledon runner-up Vera Zvonareva, No. 9 Agnieszka Radwanska and 2009 semifinalist Yanina Wickmayer.

In men's action, No. 16 Marcos Baghdatis, No. 24 Ernests Gulbis, No. 28 Radek Stepanek, and No. 30 Juan Monaco were eliminated.