After playing the longest women’s match in US Open history, winner Shelby Rogers wept tears of joy Thursday and loser Daria Gavrilova felt like she wasted an afternoon.

After a record three hours and 33 minutes, 62nd-ranked American Rogers outlasted Russian-born Australian 25th seed Gavrilova 7-6(6), 4-6, 7-6(5) on a fifth match point in a final set that lasted 90 minutes.

“That’s pretty cool, casually setting records today,” Rogers said.

“I didn’t feel like it was the longest match ever, but it’s starting to set in a little bit now. Going to be sore.”

Their second-round encounter on Court 10 went past the previous longest match on the New York hardcourts, the three hours and 23 minutes it took British qualifier Johanna Konta to defeat Spain’s Garbine Muguruza 7-6(4), 6-7(4), 6-2 in the second round in 2015.

Rogers advanced to a third-round matchup Saturday against Ukraine’s fourth-seeded Elina Svitolina for a spot in the last-16.

Gavrilova was frustrated at losing a match she led 4-2 in the third set.

“I’m pretty disappointed,” she said. “It feels like I played three-and-a-half hours for nothing.”

But the Aussie said it was nice she found a spot in the US Open record books.

“It was always going to be me,” she said. “I was always going to be in the records for the longest match somewhere. I’m not surprised.”

Gavrilova won her first Women’s Tennis Association title last week in New Haven just ahead of the US Open, so had a somewhat upbeat attitude.

“I’m pretty positive. It’s still a great hardcourt series ‘cause I ended up winning my first title,” she said. “I’m proud for my effort and hanging in there mentally.”

Rogers was tearful after embracing Gavrilova at the net.

“I’m a very emotional person. I cry a lot, that’s what I do,” she said. “It was a very special moment for me, being down in the third, coming back, having a few match points.

“Just so many ups and downs for both of us. To get through that on the winning side was just really incredible. I just had to let it all go.”

She thanked the crowd for giving her energy in the third set, saying, “I was just so grateful to them for staying there three-and-a-half hours” to watch the emotional drama.

“A rollercoaster today, ups and downs for both of us. Just told myself to keep fighting,” Rogers said.

“Luckily I pulled it out in the end. I don’t have to have nightmares about that.”

Gavrilova isn’t so lucky.

“In the tie-breaker I was trying to be aggressive and take chances but I missed my favorite shot, my forehand,” she said.

“A lot of emotions in the tie-breaker. You get nervous but then (say) ‘I’ll be brave.’ You talk to yourself a lot.

“Eventually I will (watch a replay). I think I can learn a lot from it.”