Updated

Taylor Swift surprised the crowd at the Stonewall Inn in New York City on Friday when she came onstage to perform a few of her hit songs.

The Grammy winner, 29, sang an acoustic version of "Shake It Off" and wished the crowd a “happy pride month."

Actor Jesse Tyler Ferguson joined her onstage and also emceed the event celebrating the 50th anniversary of the Stonewall uprising.

TAYLOR SWIFT SAYS HER NEW MUSIC CARRIES SOME POLITICAL UNDERTONES AHEAD OF 2020 ELECTION

"I’m so happy I don’t have to keep this secret any longer. Look who came to celebrate the 50th anniversary of Stonewall at the Stonewall Inn. @taylorswift13, you are a gem. Thank you for everything you do for the LGBTQ community,” he tweeted.

Taylor Swift takes the stage at the Stonewall Inn in New York City (Craig Barritt/Getty Images for AEG)

The event was also co-hosted by Diva Jackie Dupree, and Sara Bareilles, Gavin Creel, and Lea DeLaria also performed.

Swift just dropped her new song “You Need to Calm Down,” which targets homophobia, at midnight after announcing that her next album will be titled "Lover" and arrive on August 23.

ELIZABETH HURLEY, 53, SIZZLES IN HOT PINK BIKINI

She said in a recent interview with DPA that her upcoming music will feature political messages.

Jesse Tyler Ferguson (L) and Taylor Swift perform at AEG and Stonewall Inns pride celebration commemorating the 50th anniversary of the Stonewall Uprising.  (Craig Barritt/Getty Images for AEG)

"I definitely think there are political undertones in the new music I made,” Swift said. “I’m not planning to stop encouraging young people to vote and to try to get them to talk about what’s going on in our country. I think that’s one of the most important things I could do.”

On June 1, the first day of Pride Month, Swift posted a letter on her social media accounts that she wrote to Tennessee state Senator Lamar Alexander urging him to vote for the Equality Act, which protects LGBTQ+ people from discrimination.

TAYLOR SWIFT DODGES QUESTION ABOUT MARRIAGE AND KIDS

“For American citizens to be denied jobs or housing based on who they love or how they identify, in my opinion, is un-American and cruel,” she wrote.

In April 2018, Swift donated $113,000 to a Tennessee LGBTQ advocacy group.