Bill Clinton is seen at The Budweiser Made In America Festival on Sept. 4 in Philadelphia. | AP Photo Bill Clinton appears at Philadelphia music festival

Bill Clinton spent his Sunday evening chatting up singer Beyoncé, jamming out to Chance the Rapper, and taking selfies with fans after stopping for a surprise appearance at the Budweiser Made in America festival in Philadelphia.

While at the two-day festival in the city's museum district, the former president attempted to register people to vote in the upcoming presidential election, according to the Associated Press.

Story Continued Below

Pennsylvania, a quintessential battleground state, was won by Clinton in 1992 and 1996 and remains an essential priority of Hillary Clinton's presidential campaign this year.

The Budweiser Made in America Festival, which was founded by Jay-Z and is now in its fifth year, has become a Labor Day tradition in Philadelphia.

Adrienne Elrod, a spokesperson for Hillary Clinton's 2016 presidential campaign, tweeted Sunday a photo of Clinton listening to Chance the Rapper.

Pres Clinton hanging out at Made in America, listening to Chance the Rapper's performance pic.twitter.com/kGhCuvJV1v — adrienneelrod (@adrienneelrod) September 5, 2016

A variety of artists, including Rihanna, Coldplay, Edward Sharpe and the Magnetic Zeros, played at the festival, which began on Saturday.

Other fesival-goers also caught Clinton speaking with Beyoncé, as well as rapper Jay-Z and Alexander Ebert of Edward Sharpe and the Magnetic Zeros.

Beyoncé e Bill Cliton no Made in America Festival. #TIDALXBMIA pic.twitter.com/uEVXtABTkx — Família Carter (@oficialjayzbk) September 4, 2016

Jay Z, Alexander Ebert of Edward Sharpe and the Magnetic Zeros and former President Bill Clinton at MIA on Sunday pic.twitter.com/U8306FOKFG — AintNoJigga (@AintNoJigga) September 4, 2016