Des Moines’ Capital City Pride Fest offered more than music, ice cream and rainbow-hued outfits Saturday — it also featured a string of Democratic presidential candidates proclaiming their support for LGBTQ rights.

Hundreds of Iowans stood on a sun-baked plaza near the Statehouse, cheering as candidate after candidate praised Iowa for leading the way when the state’s Supreme Court legalized gay marriage in 2009.

At least 10 of the 23 Democrats running for president came to the annual event, which has grown as support for LGBTQ rights has become mainstream. A decade ago, a presidential candidate’s attendance at the festival might have been seen as a calculated risk, but it has now become a routine part of Democrats’ campaigns.

On Saturday, the presidential candidates walked through the crowds, giving hugs and taking selfies with potential supporters in next February's Iowa caucuses.

The current crop of candidates includes Pete Buttigieg, who is vying to become the country’s first openly gay president. Buttigieg told the crowd about his struggles in coming out publicly as a gay man a few years ago.

“There’s an act of hope, there’s an act of faith, in trusting that others will accept you for who you are, knowing that some will not,” Buttigieg said. “But if we give people that chance, it is amazing what people can do.”

The mayor of South Bend, Indiana, was one of several candidates who praised Iowa for pushing the effort forward in 2009 when the state Supreme Court legalized gay marriage.

“Iowa helped lead the way on that, showing the phenomenon of equality was not urban. It was not coastal. It was not liberal. It was human. It was American. It was the right thing to do,” Buttigieg said.

Vermont Sen. Bernie Sanders walked to the stage with dozens of chanting supporters in white campaign T-shirts. He touted his long record of supporting gay rights, including supporting a pride parade in the 1980s as mayor of Burlington, Vermont, and in opposing the 1996 Defense of Marriage Act, which barred gay marriage, after he entered Congress.

“Brothers and sisters, we are in this struggle together,” he declared, drawing cheers from the crowd. “Whether we are black or white or Latino. Whether we are Native American, whether we are Asian American. Whether we are gay or straight. Whether we are native-born or immigrant. Whether we are male or female. At this moment in American history, we stand together, and we fight for justice for all.”

New York Sen. Kirsten Gillibrand told the crowd not all fellow Democrats were with her when she introduced a bill to overturn the "don’t ask, don’t tell" policy, which allowed gay soldiers to serve only if they kept their orientation secret.

Gillibrand said some members of her party told her it would be better to have then-President Barack Obama not enforce the policy. She said they told her it wasn’t a convenient time to have a public fight over it.

“I looked them in the eye and said, ‘When are civil rights ever convenient?’” Gillibrand said.

Gillibrand joined the other Democratic candidates Saturday in decrying President Donald Trump’s stances, including his order to bar transgender people from serving in the military.

Dan Jansen of Des Moines, the board president of Capital City Pride, listened to the candidates’ speeches and the crowd’s applause. Asked if the event would have drawn this many politicians 20 years ago, he said: “No.”

“We wouldn’t have had this many presidential candidates five years ago, to be honest," Jansen said.

Jansen said part of the explanation is that most Americans have come to see LGTBQ residents and issues as a normal part of life. Also, he said, many people see such rights as being under renewed attack at federal and state levels. He added that politicians from all parties were invited to speak at the event, even though only Democrats accepted.

Harry and Starr Hinrichs of Johnston also watched the speeches. Harry Hinrichs said he was a pastor in Chicago during the 1960s Civil Rights movement. He was reminded of that movement Saturday as he saw national candidates speak up for gay rights.

“I think Iowa has a history and a legacy for being open and supportive, and I think that’s commendable,” he said. “I think it’s important for people to be intentionally conscious of what they’re standing for and do it with integrity. And the only way to do that is to stand up for it.”

Several candidates mentioned Iowa Gov. Kim Reynolds’ decision to sign a bill that would prohibit Medicaid from covering gender reassignment surgery. Those mentions drew boos from the crowd.

“We’re here because we can’t go back,” Starr Hinrichs said.

— Register reporter Austin Cannon contributed to this story.