Taylor Swift made a surprise appearance at the Stonewall Inn in New York City on Friday night (June 14), joining Modern Family star Jesse Tyler Ferguson to perform her hit "Shake It Off" to celebrate the 50th anniversary of an LGBTQ rights milestone.

2019 marks the 50th anniversary of the Stonewall riots, a series of demonstrations by members of the LGBTQ community in Greenwich Village against a police raid that began at the Stonewall Inn in 1969. The demonstrations were in protest of anti-gay legislation that often made gay bars the targets of raids, and they are generally regarded as one of the most important events that helped lead to the modern-day fight for LGBTQ rights in the U.S. June is Pride Month, and LGBTQ rights activists are staging a number of special events to raise funds and bring awareness to the cause.

Swift released a new song titled "You Need to Calm Down" on Friday, the second song we've heard from her forthcoming album, Lover. The song takes a stand against homophobia, with Swift singing, "You are somebody that we don't know / But you're comin' at my friends like a missile / Why are you mad when you could be Glaad? / Sunshine on the street at the parade / But you would rather be in the dark age / Just makin' that sign must've taken all night / You just need to take several seats and then try to restore the peace / And control your urges to scream about all the people you hate / 'Cause shade never made anybody less gay."

Country Artists Who've Come Out as Gay

She joined Ferguson onstage during his cabaret show at the Stonewall Inn, and the obviously thrilled Modern Family star lent his vocals to the bridge and the last chorus of "Shake It Off." Sara Bareilles was one of the performers on hand, and she shared the footage above to Instagram.

"Honestly have you ever seen anyone happier? It’s the greatest thing," Bareilles writes. "50 years ago this year, the movement began. A daring resistance in order to claim dignity, freedom, and basic human rights. It has unfolded into what is now a global declaration of PRIDE!! I’m proud to stand with a glorious, colorful community that is still fighting to create safe spaces for those who still seek them."

According to Spin, GLAAD reported a spike in donations of $13 after Swift's new song dropped on Friday. Swift's favorite number is 13, and the organization thanked Swift publicly for her support.

“Taylor Swift is one of the world’s biggest pop stars,” says GLAAD’s director of talent engagement, Anthony Ramos. “The fact that she continues to use her platform and music to support the LGBTQ community and the Equality Act is a true sign of being an ally. ‘You Need to Calm Down’ is the perfect Pride anthem, and we’re thrilled to see Taylor standing with the LGBTQ community to promote inclusivity, equality, and acceptance this Pride month.”

Swift recently wrote an open letter to Tennessee Senator Lamar Alexander urging him to vote for the Equality Act, which protects LGBTQ people from discrimination. The country-turned-pop superstar also created a Change.org petition in support of the act, and she donated $113,000 to the Tennessee Equality Project in April.

Swift is set to release Lover in August. She has yet to announce tour plans to support the project.

See Country Music's Most Political Singers

More From 97.5 KGKL