Taylor Swift and Jesse Tyler Ferguson "Shake It Off" at Stonewall Inn's 50th Pride Celebration

Taylor Swift's celebration of Pride Month continued on Friday when the 29-year-old singer surprised fans with a performance at NYC's Stonewall Inn. Members of the LGBTQ+ community and allies gathered at the venue to honor the 50th anniversary of the 1969 Stonewall uprising in which LGBTQ+ people demonstrated against a violent police raid of the gay bar. At this year's observance of the historic event, Swift took the stage to perform her 2014 hit "Shake It Off."

Modern Family star Jesse Tyler Ferguson hosted the gathering, and Swift gave him a little shout-out before the set. "I heard that this is Jesse's favorite song to do at karaoke, which is an incredible rumor. I really wanna believe it's true," she said. "So if there's anything you feel like you wanna jump in on, if there's your part that you're really good at, then just sing, dance, just be yourself. This is a really safe space." Ferguson definitely took her up on that offer and joined her on stage near the end of the song and crooned alongside the pop star.

After the show, Ferguson tweeted a special thanks to Swift, writing, "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."

Swift's Stonewall Inn set came the same day she dropped her single "You Need to Calm Down," in which she references Pride Parades and the LGBTQ+ organization GLAAD. At the very start of Pride Month, she even penned a letter to Tennessee Senator Lamar Alexander, urging him to support the Equality Act that would shield LGBTQ+ members from discrimination in the workplace, schools, and other forums. Shortly after sharing the message, she performed at iHeart Radio's Wango Tango music festival and declared that everyone deserves to have the same rights, regardless of whom they love.

Ahead, watch Swift and Ferguson "shake it off" at Stonewall Inn before viewing more pictures from the show!

click to play video