NEW YORK – A year ago at this time, Russian Maria Sharapova was sitting out the U.S. Open, getting checked by doctors and having tests on the surgically repaired right shoulder that has troubled her off and on.

On Wednesday, Sharapova found herself down by a set and facing a break point early in the second at Flushing Meadows, bothered by the whipping wind, her own off-target strokes and an opponent who wasn’t backing down.

As dusk fell and the Arthur Ashe Stadium lights came on, the fifth-seeded Sharapova came through the way she so often does in the crucible of a third set, beating 95th-ranked Alexandra Dulgheru of Romania 4-6, 6-3, 6-2 in the second round of the Grand Slam tournament she won in 2006 but missed twice in the past six years.

Sharapova had more in the tank when it mattered.

Unlimited Digital Access. $1 for 4 weeks.

“Overall I felt like in the end I was in much better shape than she was, and I could have played another few sets,” she said. “Mentally that helped me a lot.”

Dulgheru had been limited to one set over the past five weeks because of inflammation in her right wrist, which was operated on in May 2013 and flared up recently.

Sharapova improved to 17-6 in three-set matches this season, including four victories in a row that went the distance en route to the title at the French Open in June, her fifth Grand Slam trophy.

Sharapova fared better than some other seeded women in the second round, although No. 19 Venus Williams, an American who was the 2000-01 champion in New York, advanced with a 6-1, 6-4 victory over 78th-ranked Timea Bacsinszky of Switzerland.

Fourth-seeded Agnieszka Radwanska of Poland became the first man or woman seeded in the top 10 to lose, defeated 6-3, 6-4 by 39th-ranked Peng Shuai of China. And No. 21 Sloane Stephens of the United States had her earliest exit at the U.S. Open, eliminated 5-7, 6-4, 6-2 by 96th-ranked Johanna Larsson of Sweden.

Stephens made a whopping 63 unforced errors.

The U.S. Open is the only Grand Slam tournament at which Radwanska never has made it to the quarterfinals.

“I really want to know the answer,” Radwanska said. “Then maybe I will find a way to play better here and just try another way to be in the second week.”

No. 3 Stan Wawrinka of Switzerland snapped at a rowdy spectator, telling him to “shut up” during a 6-3, 6-4, 3-6, 7-6 (7-1) victory over 91st-ranked Thomaz Bellucci of Brazil.

“At the end of the day, they start to get a little bit drunk,” Wawrinka said at his news conference, shaking his head and chuckling. “It was OK. I had to talk to a few of them.”