More than 1,000 people have gathered in Warsaw in support of LGBT rights a week after the first pride march in the city of Białystok was marred by violence.

Poland’s ruling Law and Justice party (PiS) has made LGBT rights a campaign issue ahead of parliamentary elections expected in October, with many politicians arguing that pride marches promote unnecessary public displays of sexuality.

“The tension is growing and is tied to the politics of the ruling party, which are hateful and intolerant,” said Marta Zawadzka, a 17-year-old student who attended the gathering. She said examples “include blaming LGBT people and painting them as paedophiles and bad people”.

Disapproval over displays of support for LGBT rights spilled over into the streets of Białystok last Saturday, with videos posted online showed men attacking marchers and shouting homophobic insults.

Police have detained more than 30 people in connection with the violence while politicians, including the prime minister, Mateusz Morawiecki, have condemned the attacks.

A Warsaw court this week put a temporary hold on the distribution of “LGBT-free zone” stickers by a Polish conservative magazine.

Those who gathered on Saturday in Warsaw waved rainbow flags and carried rainbow umbrellas.

“I am here because of what happened in Białystok and because of the ‘LGBT-free zone’ stickers,” said Amelia Rae, a 15-year-old student. “If something is going to change than the government needs to change.”

Analysts say PiS is hoping to re-energise its mainly rural base by vowing to push back against western liberalism and benefit from the deepening divisions in society over policies towards minority groups, the environment, abortion and migration.

“Everyone has the right to gather and express their views on any matter. In Poland, we have freedom of assembly,” a PiS spokeswoman told Reuters.

Warsaw held one of its largest pride marches to date earlier this year, with tens of thousands of participants.