SAN FRANCISCO — Tens of thousands of people waving rainbow flags lined streets for gay pride parades Sunday in coast-to-coast events that took both celebratory and political tones, the latter a reaction to what some see as new threats to gay rights in the Trump era.

In San Francisco, revelers wearing rainbow tutus and boas held signs that read “No Ban, No Wall, Welcome Sisters and Brothers” while they danced to electronic music at a rally outside City Hall.

Frank Reyes said he and his husband decided to march for the first time in many years because they felt a need to stand up for their rights. The couple joined the “resistance contingent,” which led the parade and included representatives from several activist organizations.

“We have to be as visible as possible,” said Reyes, wearing a silver body suit and gray and purple headpiece decorated with rhinestones.

“Things are changing quickly and we have to take a stand and be noticed,” Reyes’ husband, Paul Brady, added. “We want to let everybody know that we love each other, that we pay taxes and that we’re Americans, too.”

Activists have been galled by the Trump administration’s rollback of federal guidance advising school districts to let transgender students use the bathrooms and locker rooms of their choice.

The Republican president also broke from Democratic predecessor Barack Obama’s practice of issuing a proclamation in honor of Pride Month.

But the pride celebrations also faced some resistance from within the LGBT community itself. Some activists feel the events center on gay white men and are unconcerned with issues including economic inequality and policing.

The large “resistance contingent” leading San Francisco’s parade included groups that represent women, immigrants, African-Americans and others along with LGBT people.