NEW YORK — Taylor Townsend was the darling of the US Open’s first week last year.

Twelve months later, she’s done it again, with a confidence and assuredness that only seems to be growing. 

The 30-year-old American, who said she was “feeling it” after her second-round win over Taylah Preston on Wednesday, kept the good vibes going on Friday with a thrilling upset of 15th seed Diana Shnaider.

Unlike her first two matches in Queens this week, dominant wins over 20th seed Maja Chwalinska and Preston, Shnaider was a tough out. After Townsend breezed through the opening set in a half hour, the French Open semifinalist came from 5-3 down to win the second in a tiebreaker, leveling the match on her seventh set point. Townsend then rebounded to take the decider, winning the final three games, for the 6-2, 6-7 (3), 6-3 victory in 2 hours and 27 minutes. 

The win sends Townsend into the US Open fourth round for the second consecutive year.

Townsend again served very well, winning 69 percent of her first-serve points, and was aggressive throughout, striking 39 winners to 30 unforced errors and coming to the net 44 times. She also made the most of her opportunities on Shnaider’s serve, winning five of her eight break points.

After Shnaider’s last ball sailed wide, Townsend let out an emphatic roar and an anime-inspired celebration, smiled widely, then started to cry. The Court 17 speakers appropriately blasted Kelly Clarkson’s “Stronger (What Doesn’t Kill You)” as Townsend warmly embraced her coach, Roger Tyzzer.

Townsend started working with Tyzzer in March, and their partnership is unconventional. They predominantly work remotely — Tyzzer is based in Australia and Townsend in Atlanta — and they didn’t meet in person until the French Open. 

In addition to the work they’ve done on the court, Tyzzer has encouraged Townsend to just be herself and put less focus on what others are saying and thinking. That mental shift has been a game-changer for the doubles World No. 2, who last month qualified for the WTA Finals in Indian Wells alongside partner Katerina Siniakova.

Their post-match hug was a culmination of the work they’ve done, and the progress they’ve made, over the past six months.

“You guys don’t understand, I’ve been through so much over this year,” Townsend said during her on-court interview after the match. “I honestly was so nervous coming into this tournament because I knew that I made the fourth round last year. I didn’t want my ranking to drop. I wanted to prove that I was just as good this year as I was last year, and I had to let all that s*** go.

“I literally had to let all that s*** go and just say, ‘Taylor, just go and play.’ And I think that this is the most free that I’ve ever been on the court. I’m having so much fun. And, first off, thank you so much to you guys for supporting me. But honestly, it wasn’t a doubt in my mind. I said my prayers this morning and I felt it. I said, ‘This is mine and I’m going to go for it.’ And so we’re here.”

For Townsend to reach the quarterfinals, where she’s never been at the US Open or any other Grand Slam, she’ll have to get through World No. 1 and two-time defending champion Aryna Sabalenka, currently on a 16-match winning streak in New York. Earlier in the day, top-seeded Sabalenka defeated Kamilla Rakhimova in straight sets.

Townsend is more than a little excited for that marquee matchup. And 15 years into her career, she’s not going to be intimidated by the moment. 

“I’m f***ing pumped!” she said. “I’m so excited. I feel like I thrive in these moments. I played Coco [Gauff] on [Court Philippe] Chatrier, I played Iga [Swiatek] on Centre Court. I’ve played Simona Halep on [Arthur] Ashe [Stadium], I’ve played Serena [Williams] on Ashe. I’m built for these moments. Now it’s my time. I’m ready to take it. I’m ready to go.”

Despite both players being WTA Tour Driven by Mercedes-Benz veterans, this will be their first career matchup.