NEW YORK (AP) — When Jessica Pegula agreed to play in an exhibition tennis event at Madison Square Garden, she had no idea how her career would change before she got there.

The Buffalo native always loved playing in New York, but the U.S. Open was just like the other three tennis majors. She had never been able to get past the quarterfinals.

But shortly after committing to play in The Garden Cup, she broke through and reached the final at Flushing Meadows in September, losing to current No. 1-ranked Aryna Sabalenka and creating memories that came flooding back when she returned this week.

“So I think even now that I’ve had that great result, being able to come back, it’s even cooler,” Pegula said.

Pegula lost 7-6, 7-5 on Wednesday night to fellow American Emma Navarro, a U.S. Open semifinalist. Carlos Alcaraz, a four-time Grand Slam champion, then beat American Ben Shelton 4-6, 6-2, (7-4), delivering entertaining exchanges before a sold-out crowd that was announced at 19,698.

“Really happy to show you my tennis,” Alcaraz, who won his first major title at 19 at the 2022 U.S. Open, told the fans afterward.

Alcaraz got back on court after a brief break, saying he didn’t touch his racket for about 1 1/2 weeks after playing for Spain in the Davis Cup in what was Rafael Nadal’s final appearance before retiring.

Pegula had a longer one, needing to rest a knee that was bothering her after playing in the WTA Finals in Saudi Arabia in early November. She took about three weeks off, then started hitting again about two weeks ago to prepare to play Wednesday.

She may have declined the exhibition for more time off during the short tennis offseason, but didn’t want to pass up playing at MSG.

“When they were like, ‘You get to play in MSG,’ I was like, ‘Ooh, that’s sick,’” Pegula said. “To me, I just think that in general, if it wasn’t at MSG, I don’t know, then maybe I wouldn’t have done it, to be honest. It’s something that’s special to be able to do it in New York City during Christmastime. It’s really cool against another American. There’s so many factors I feel like that made me want to say yes.”

Heading into the year, she had been 0 for 6 in Grand Slam quarterfinal matches. Then she upset No. 1 Iga Swiatek, a massive victory in a strong summer stretch that set up her longest stay in a major tournament.

“It feels like I was just here,” Pegula said. “The stress and just everything and the chaos of those three weeks, it’s kind of funny, you feel it instantly coming back to the city.”

Pegula’s parents own the NFL’s Buffalo Bills and NHL’s Buffalo Sabres. Even before becoming a major finalist, she felt support from the home fans when she played in New York.

But when she went to a Rangers game this week and heard loud cheers as a highlight from a U.S. Open match was played, she realized how much more there might be now.

“I think it’s so fun to play here and being an American. There’s a lot of Bills, a lot of Sabres fans that are always at the U.S. Open, whether they live here or they come to watch me,” Pegula said. “So I think I always feel a little bit of a connection just being a Western New Yorker, but New Yorker nonetheless.”