Bialystok, Poland (CNN) A Polish city celebrated its first-ever LGBTQ equality march on Saturday, but it struck a starkly different tone to the joyous and hedonistic affairs associated with pride parades.

Ringed by riot police, around 1,000 pride marchers walked defiantly through the streets of the northeastern city of Bialystok as thousands of nationalist football "ultra" fans, far-right groups and others threw flash bombs, rocks and glass bottles.

As counter-protesters yelled "God, honor and motherland" and "Bialystok free of perverts," the pride marchers chanted "Poland free of fascists" in return. Police said about 4,000 people were involved in demonstrations against the march.

Bags of flour and other objects were thrown out of Communist-era housing blocks at the pride marchers, who were moving along a 3-kilometer (1.8 mile) route through the city center.

According to Bialystok's police spokesman, Tomasz Krupa, the violence led to the detention of 20 people, four of whom were suspected of committing crimes, including the use of threats and insults against officers.

The police kept a protective ring around pride marchers throughout the three-hour march.

The city of 298,000 people is located in the conservative region of Podlasie, a stronghold for Poland's ruling right-wing Law and Justice party, known by its acronym PiS.

According to anti-racism groups, Bialystok has become a byword for its strong far-right movements. "Many of the acts of xenophobic aggression have been committed in Podlasie compared to other regions in Poland," Rafal Pankowski, from the anti-extremism group Never Again, told CNN.

But the hostile atmosphere did not dampen the mood of a multi-generational group of marchers, who described the event as a victory in their fight for more equality -- despite the threats.

"I am trying to see this in a joyful way, but this march is also sad for me because I did not think it would be as dangerous as it is," Anna Pietrucha, 26, who came from Warsaw to speak at the march, told CNN.

Saturday's march was one of 24 parades scheduled to take place this year in Poland -- a record number that campaigners say is a reaction to the uptick of homophobic and transphobic language by Poland's Catholic leaders and PiS.

"We are in the middle of an ongoing wave of hateful propaganda, which is fueled by both the state and the Catholic Church," Hubert Sobecki, co-president of Warsaw-based LGBT+ organization Love Does Not Exclude, told CNN from a cafe in Bialystok.

Counter protests

According to officials, there were about 32 protests registered for Saturday, the majority in opposition to the pride march.

These included a family picnic at Bialystok's Branicki Palace -- organized by Artur Kosicki, the marshal of Podlasie -- and an outdoor prayer vigil next door at the Roman Catholic Bialystok Cathedral.

Bialystok's Catholic Archbishop Tadeusz Wojda called on congregants to "defend Christian values" by attending the picnic, adding that the LGBTQ march was "an initiative foreign to" the region.

Ultra-nationalist football hooligans, far right organizations and others took part in counter-protests across the city.

The picnic had bouncy castles, folk musicians and the local army regiment exhibiting its artillery. CNN approached Kosicki, who is from PiS, for an interview, but he declined. PiS and the government also ignored repeated requests for comment by CNN.

Minutes later, more flash bangs were heard in the near distance, set off by far-right groups outside the complex as they attempted to block pride marchers from proceeding any further.

The march ended soon after 5 p.m. local time, after the police deployed stun grenades and pepper spray to clear the far-right protesters.

Some pride marchers were seen removing their makeup, hiding their rainbow flags and wiping off glitter; they told CNN it was in an attempt to blend in with the pedestrians and leave the city center safely.

Pushback against equality

Many Poles in the country's urban centers are supportive of the push for more LGBTQ rights, with Warsaw hosting its largest pride parade earlier in June.

But there has been resistance elsewhere to the community's increasing visibility in a country where same-sex marriage and adoptions are illegal, and anti-LGBTQ attacks are not considered a hate crime by law.

In the run-up to October's general election, PiS party leader Jaroslaw Kaczynski framed the opposition's support for more equality as an "attack on the family," calling LGBTQ rights a "threat" in the devout Catholic country.

"I think the way that some politicians of this party spoke publicly about LGBT[Q] issues made other people in Poland less afraid to use hate speech," local gay rights activist Joanna Gluszek, 28, who co-organized Bialystok's march told CNN.

Critics say the tactic helps rally its more religious and rural base. "All the signs are showing that Kaczynski will continue with the scapegoat strategy, which goes hand-in-hand with the Polish Catholic church that has made the LGBTQ community its biggest enemy," said Miroslawa Makuchowska, head of the political division of the Polish advocacy group Campaign Against Homophobia.

Riot police deployed stun grenades and pepper spray to clear far-right protesters.

The environment has emboldened right-wing media and far-right organizations. This week, the right-wing weekly publication Gazeta Polska announced plans to distribute stickers proclaiming an "LGBT-free zone" to its readers. The stunt drew widespread condemnation in and outside the country.

The Warsaw-based nonprofit Campaign Against Homophobia (KPH) told CNN that more than 30 councils had declared themselves free of "LGBT ideology" in the past few months -- in response to Warsaw's liberal mayor Rafal Trzaskowski, from the opposition Civic Platform (PO), signing a declaration in support of LGBTQ rights.

In Bialystok, leaflets anonymously placed around the city ahead of the march said that streets would be "contaminated with LGBT bacteria" on Saturday.

"Even though the march faced obstacles ... I hope it's a start of a new mindset here," Gluszek said in a text message after the march. "The [march's] participants, mostly Bialystok citizens, didn't let fear overcome them and showed they are not afraid."