Reynolds has spoken about regretting preaching against homosexuality as a young Mormon missionary.

Dan Reynolds waved the Pride flag at an Imagine Dragons show Saturday, during the Lollapalooza Brazil Festival at Sao Paulo’s Interlagos Racetrack.

The 30-year-old singer-songwriter has made LGBT rights his cause in recent years: The new documentary Believer charts his journey from young Mormon missionary to rock star to LGBT ally and advocate.

Dan Reynolds

Reynolds was raised LDS and, for two years in Omaha, “knocked [on] thousands of doors” telling people that being gay was a sin. “The doctrine is, if you are gay and acting upon it, that is sinful,” he explained. “I wish I could re-knock [on] all those doors and tell them that I was wrong,”

Last summer Reynolds received The Trevor Project’s 2017 Hero Award. He’s also worked with GLAAD and the anti-bullying group Stand4kind.

“To be gay is beautiful and right and perfect—to tell someone they need to change their inner-most being is setting up someone for an unhealthy life and unhealthy foundation,” he said at the TrevorLIVE gala. “I know a lot of Mormon youth who are gay and hide it because they feel as though God hates them or God is judging them. In Utah, the number one reason for death among teenagers is suicide.”

Reynolds says he still believes in Mormonism, “but we all can be educated to create positive change.”

Dan Reynolds

Last week he took to Twitter to urge fans in Las Vegas to support transgender students.

“Our LGBTQ youth need you. they need us to adopt policies that protect their well being and health. we must step up,” he wrote.