WARSAW, Poland — The capitals of Poland and Romania hosted festive gay pride parades that attracted thousands of people Saturday, as emboldened participants vowed to keep pushing for the eventual freedom to marry the person of their choice.

A party-like atmosphere prevailed at the parade in Warsaw as people waved rainbow flags and danced. Some had signs and T-shirts with messages of tolerance or sass, including one of Russian President Vladimir Putin holding a rainbow.

The celebratory mood could not be subjugated even though same-sex marriage has no real chance of being legalized under Poland’s current conservative government.

“The worse the political atmosphere, the better the atmosphere at the parade,” observed Michal Niepielski, 55, a radio technician from Krakow.

Niepielski judged Saturday’s turnout to be bigger than for last year’s parade. He attended the event with his partner of 14 years, Wojtek Piatkowski, who called the high spirits a “backlash” against the Polish government. The couple wore matching rainbow suspenders and bow ties.

Participants of a gay pride parade walk through the streets of Warsaw on Saturday. Janek Skarzynski / AFP - Getty Images

In the Romanian capital of Bucharest, the rights of same-sex couples also took center stage during a gay pride parade that came days after a major ruling in a marriage case.

The European Court of Justice in Luxembourg ruled Tuesday that two men — one Romanian, the other American — are entitled to the same residency rights as other married couples in the European Union.

While the ruling doesn’t oblige individual EU member countries to legalize same-sex marriages, it could presage rulings in other pending cases that LGBT rights advocates would consider favorable.

Romania, Poland, Slovakia, Bulgaria, Lithuania and Latvia are the EU countries that don’t legally recognize same-sex couples.

Before the parade, choreographer Emil Rengle wanted fellow Romanians who oppose same-sex relationships to know, “We love differently because God created us differently.”

In Poland, the “Equality Parade” festivities got underway Friday night, when a temporary art installation shined a rainbow created with water and light for four hours in downtown Warsaw.

A record number of gay pride marches — 12 — are scheduled across predominantly Catholic Poland this season, including in five cities having them for the first time. Some of the new locations are considered conservative strongholds, like Rzeszow and Opole.

“People are fed up with feeling like they are under a boot and being trampled down. And they are reacting, they are organizing, they are resisting,” said Hubert Sobecki, president of Love Does Not Exclude, a group working for the legalization of same-sex marriage in Poland.

A record number of foreign ambassadors to Poland — 52 — signed an open letter of support for LGBT rights, up from 42 last year. They included the ambassadors of the United States, Canada, Britain and Turkey.

There were reminders that the cause is not embraced by all. In Poland, a retail chain that sells books and music, Empik, changed its logo for the day into a rainbow. It sparked a heated debate online, with some vowing to boycott the business.

A small group of counter-protesters showed up in Warsaw, but police kept them away from the parade. Romanians who consider homosexuality to be a threat to society rallied in Bucharest before Saturday’s gay pride parade.

New Right movement leader Tudor Ionescu said the parade was “a disgrace, a slap on the cheek of a Christian capital.”

Participants in the opposition rally called for a referendum to define marriage as a union between a man and a woman. Romania’s marriage law currently defines marriage as a union of spouses, which gay rights opponents say could open the door to same-sex marriages.

Orthodox Christian monk Ciprian Timofte said homosexual activity, which was decriminalized in 2002, should be outlawed again in Romania.