American wild-card entry Kristie Ahn shocked Jelena Ostapenko 6-3, 7-5 in the third round of the U.S. Open on Saturday.

Though Ostapenko flaunted her strong serve with eight aces, it also was the root of her struggles with 12 double faults to Ahn’s three. It was a sloppier match for Ostapenko, who committed 45 unforced errors, but ultimately Ahn managed to outwork her.

Ahn, ranked No. 141, took an injury timeout midway through the second set after landing awkwardly on her left knee. Returning to the court with the knee heavily taped, she came back from a 3-2 deficit to take the lead before closing out the match with an ace. Ahn played a mature game toward the end of the first set to take the win and set the tone for the final set.

Though Ahn started strongly in the second, breaking Ostapenko in the first game, it wasn’t enough to make the Latvian go quietly. Ostapenko rallied to even the score in the fourth game to make it 2-2, but Ahn’s break in the 11th game to go up 6-5 allowed her to work her way to the win.

“I think if I don’t fully process it, then I’ll never have to fully deal with it,” she said. “I could finally let my emotions get to me. The crowd roared. I was like, ‘You cried what a little baby.’ All my friends told me they cried too.’’

Ahn will face Belgium’s Elise Mertens in the fourth round Tuesday.

Taylor Townsend and Ahn are the first American duo of a qualifier and a wild card to reach the U.S. Open Round of 16 since wild-card records started being kept in 1987.

Ahn, a Flushing Meadows native, earned her wild card through the USTA’s U.S. Open Wild Card Challenge.

Ostapenko drew a warning for verbal abuse of a lineswoman. She complained to the chair umpire, with her defense essentially being lost in translation: “I was speaking Latvian. I wasn’t speaking Russian. Does she speak Latvian?”

New York is a second home for Caroline Wozniacki, who has made two U.S. Open finals and three semis, run the New York City Marathon and even keeps an apartment in the city. And it looks like she’ll be staying around despite Saturday’s 6-4, 6-4 loss to Bianca Andreescu.

“I’ll stay here for a little bit,” Wozniacki said. “I have an exhibition in Greenbrier in a couple of weeks — 10 days, couple of weeks. So, yeah, I’m going to stay around for a little bit.

Anett Kontaveit withdrew from her slated third-round singles match versus Belinda Bencic with an acute viral illness, sending Bencic to the round of 16 with a walkover. But the withdrawal was only for singles, with Kontaveit and Daria Kasatkina reaching the second round in doubles .