NEW YORK — Shelby Rogers knew she was in for a tough match, facing a quick opponent who runs down a lot of shots.

More than 3 1/2 hours later, she finally won it.

The 62nd-ranked American prevailed in the longest women's match in U.S. Open history, beating No. 25 Daria Gavrilova of Australia 7-6 (6), 4-6, 7-6 (5) on Thursday in the second round.

"I didn't feel like it was the longest match ever," Rogers said. "But it's starting to set in a little bit now. Going to be sore."

The match lasted 3 hours, 33 minutes, with Gavrilova finishing with a 133-132 edge in total points won.

"Got the last one, that's all that matters," the 24-year-old Rogers said.

Johanna Konta won the previous longest match, beating Garbine Muguruza in a 2015 second-round meeting that lasted 3:23.

Gavrilova was asked what she thought was the difference in the match.

"The two last points," she replied.

The winner of her first career title last week at the Connecticut Open, Gavrilova wouldn't have had to worry about losing in a tiebreaker if she was playing in another Grand Slam tournament. The U.S. Open is the only one of the four that uses a tiebreaker in the decisive set, but she wouldn't have been interested in playing more games anyway.

"No, it was a 3 1/2 (hour) match," she said. "Just get it done. Get it over with."

When Rogers finally did, she moved on to a third-round match against No. 4 seed Elina Svitolina. But first, she stopped off for some treatment — and a well-deserved meal.

"Ice bath, straight to dining," she said. "That was a long time to go without eating."