NEW YORK -- Sara Errani wagged her finger and cupped her hand to her ear for the U.S. Open fans who tried to will Venus Williams to victory.

"I think I will remember forever that moment," Errani said.

Two points from defeat, the diminutive Italian rallied to force a third-set tiebreaker and outlasted Williams in a match that was both lopsided and tight.

Errani won 6-0, 0-6, 7-6 (5) in the third round Friday after Williams had a chance to serve out the match in the final set.

Williams twice came back from down a break in the third but was done in by too many unforced errors -- she made 52 in all. Trying to close out the match at 5-3, the 19th-seeded Williams had one of her eight double-faults.

The 13th-seeded Errani next faces qualifier Mirjana Lucic-Baroni, who stunned second-ranked Simona Halep 7-6 (6), 6-2. The 32-year-old Lucic-Baroni hadn't made a Grand Slam round of 16 since 1999, waylaid by injuries and financial struggles.

"I feel like a little kid, like this is the first time ever happening," Lucic-Baroni said.

Errani, who wasn't thrilled with fans yelling out support for her opponent during her serves, won just 12 games in three previous meetings with Williams. But in the first set, Williams couldn't take advantage of her power, making just 30 per cent of her first serves.

Errani used her quickness to run Williams around the court, and the 34-year-old seemed sluggish after playing a long doubles match with her sister on Thursday night.

But in the second, Williams looked like the seven-time major champion she is, pouncing on Errani's soft serves.

"She's playing unbelievable," Errani said. "I really don't know how I won today."

Errani just had a little more left in the final set. And in the tiebreaker, Williams made four more unforced errors.

Errani's quick reflexes, honed in doubles, gave her match point when she stabbed a backhand volley to return what looked like a sure winner by Williams.

"Unbelievable," Errani said. "If I don't do that, maybe I lose."

The 5-foot-4 Errani reached the final at the French Open and the semis at the U.S. Open in 2012, but both times she was routed by power players: Maria Sharapova and Serena Williams.

Big sister Venus couldn't do the same Friday, though she had another chance at victory in a doubles match later with Serena.

Sixth-seeded Angelique Kerber also was upset, losing 6-1, 7-5 to Swiss teen Belinda Bencic. Bencic, 17, is coached by Martina Hingis' mother, Melanie Molitor, and was coming off a third-round showing at Wimbledon.

"I started believing that I can play with these players," Bencic said.

Earlier, Peng Shuai again beat a seeded player to reach her second straight Grand Slam round of 16. Two days after upsetting fourth-seeded Agnieszka Radwanska, Peng defeated 28th-seeded Roberta Vinci 6-4, 6-3.

The Chinese veteran had gone two years without making it past the second round at a major tournament before her Wimbledon run this summer. But she didn't meet any seeded players in the first three rounds there before losing to eventual champion Petra Kvitova in straight sets.

This time, Peng, ranked 39th, will face 14th-seeded Lucie Safarova to try to reach her first Grand Slam quarterfinal.

Peng said she'll need "more courage" in that match.

She'll have the momentum of two straight sharp performances. With third-ranked Li Na sidelined by a knee injury, Peng's success is giving the fans in China something to cheer.

"I don't know how it's on Sunday," she said. "I hope I will be same."

The 31-year-old Vinci had made the quarterfinals at the U.S. Open the past two years, but lost in the opening round at the first three major tournaments of 2014.

Ninth-seeded Jelena Jankovic advanced by routing Johanna Larsson 6-1, 6-0. The 96th-ranked Larsson had upset Sloane Stephens in the second round.

On the men's side, fourth-seeded David Ferrer advanced to the third round when Bernard Tomic withdrew because of a left hip injury.

Seventh-seeded Grigor Dimitrov and 12th-seeded Richard Gasquet both moved on in straight sets.