Robert Biedron was elected Sunday Nov. 30, 2014 to be the mayor of the northern Polish city of Slupsk, making him also the first openly gay mayor in Poland. Alik Keplicz, AP

Alik Keplicz, AP

Robert Biedron was elected Sunday Nov. 30, 2014 to be the mayor of the northern Polish city of Slupsk, making him also the first openly gay mayor in Poland.

WARSAW, Poland — Robert Biedron already made history once in Poland by becoming the first openly gay lawmaker in parliament in 2011. On Monday, he became the country’s first openly gay mayor.

The 38-year-old’s political successes are a marker of how quickly this deeply conservative and Catholic country has changed in the decade since it joined the European Union. Back then, in 2004, gay rights marches were still being banned and homosexuality was treated as a huge taboo. Since then a growing acceptance of gays and lesbians has arrived hand-in-hand with a flourishing economy.

“I see how fast Polish society has learned its lesson of tolerance,” Biedron told The Associated Press in an interview two days before he was elected Sunday to be mayor of Slupsk, a city near the Baltic Sea in northern Poland. “So I am very optimistic and happy with Polish society – and proud.”

But it’s not just him. In what the Polish media are calling “the Biedron effect,” a record number of candidates also came out publicly before the local elections, which took place in two rounds over the last two weeks.

None of the others won seats, but gay rights activists are still hugely encouraged by the change. Their poor showing can be attributed largely to the fact that they were mostly young first -time candidates with left wing parties, which saw little support.

“These people have enormous courage, in my opinion,” said Mariusz Kurc, editor of a Polish gay advocacy magazine, Replika, who believes that the vast majority of political candidates in Poland still hide their identity.

He tells a story that shows the speed of the change. Before 2011 elections, he used his magazine’s Facebook page to call on gay candidates still in the closet to come out. None did. But this time around, people started writing in to say they would be happy to be publicly identified as gay, lesbian or bisexual. Nearly 20 had come out by election day.

“This was record breaking,” Kurc said.

Kurc’s group included Joanna Erbel, a Warsaw mayoral candidate who spoke out about being bisexual four days before the first round of voting on Nov. 16. Representing the small Green party, she won less than 3 percent of the vote and was eliminated from a runoff, but she doesn’t believe that being bisexual was a factor either way.

Biedron, an independent who was named one of the country’s best lawmakers this year by the weekly magazine Polityka, represents a cultural shift in other ways too.

He inherits a city that is one of the most indebted in Poland and has pledged to transform it by cleaning up city hall and reviving the moribund economy with investments in green energy. He is vowing to live modestly, saying he will forego the traditional perk of a luxury car and chauffer in favor of public transportation and bicycle.