WARSAW, Poland (AP) - The largest gay pride parade in central Europe took place again in Warsaw on Saturday for the first time in two years after a pandemic-induced break - and amid a backlash in Poland and Hungary against LGBT rights.

The year's Equality Parade came 20 years since the event was first held in the Polish capital. It was banned twice in its early years by a conservative mayor who feared it would promote homosexuality and last year it was canceled due to the coronavirus pandemic.

Warsaw Mayor Rafal Trzaskowski walked at the head of the parade in a sign of support for LGBT rights, joining thousands who were cheered on by others waving rainbow flags from apartment balconies and sidewalk cafes.

But that level of acceptance is not universal in Poland, a heavily Catholic, largely conservative nation.

The joyful and colorful celebration was tinged with fear of what the future holds for the rights of gay men, lesbians, bisexuals and transgender people after setbacks first in Russia and now in Hungary.

“The day of the parade is always a bittersweet moment for our community,” said Rafal Wojtczak, a spokesman for the organizers. He described feelings of sadness and helplessness that LGBT people have not achieved rights liked same-sex partnership or marriage in Poland, while also facing new threats.

The parade comes only days after Hungary's parliament passed a law that makes it illegal to show any materials about LGBT issues to people under 18.

Hungary's conservative ruling party portrayed the law as an effort to fight pedophilia. But human rights groups say it will stigmatize LGBT people and prevent youth from accessing critical information.

Poland's populist ruling party has taken a political direction very similar to that of Hungary under Prime Minister Viktor Orban, pushing conservative policies and tightening ruling party control over courts and media. The European Union has criticized both nations, accusing them of eroding democratic norms.

One prominent Polish activist, Bart Staszewski, carried a Hungarian flag in Saturday's march, saying it was a message to the EU to defend LGBT people because he fears that “Poland will be next.”

Among those who participated was Misza Czerniak, a 37-year-old musician who was born in Russia and emigrated to Poland 10 years ago in part to flee the homophobia there. Czerniak said the recent scapegoating of LGBT people by Polish officials feels reminiscent of Russia, in particular local anti-LGBT resolutions that “create an atmosphere of hate, suspicion and fear.”

“The right-wing turn has made Poland feel much closer to my country of origin than I would have liked. It made me question why I moved here,” he said.

Ambassadors and other diplomats from 14 embassies in Warsaw also took part, including the U.S. charge d'affaires Bix Aliu, who tweeted “Let's choose love not hate.”

A year ago, the Polish LGBT community faced a backlash from ruling conservative politicians, local communities and the church. In his successful bid for reelection against a challenge from Trzaskowski, President Andrzej Duda declared that “LGBT is not people; it's an ideology” while also claiming that it was “even more destructive” than communism.

A Polish archbishop warned of a “rainbow plague.” And dozens of local communities in Poland passed resolutions against “LGBT ideology,” claiming to protect traditional families. The resolutions were strongly denounced by EU officials and a handful have been rescinded.

“We've been through a very, very rough time. But at the same time, we are going out in the streets and we are saying we are stronger and we are not going to give up,” said Miroslawa Makuchowska, vice director of Campaign Against Homophobia.