As tens of thousands of far-right marchers took to the streets on Thursday to commemorate Poland’s recovery of national sovereignty at the end of World War I, the tensions on the border with Belarus threatened to inflame passions that have in previous years led to ugly scenes and clashes with the police and other demonstrators.
It is a day meant to evoke unity and solidarity, but in recent years, Polish Independence Day has more often served to underscore the divisions that have been tearing at the nation.
In downtown Warsaw, demonstrators started their march by lighting red flares and singing the national anthem. A small group of young men trampled a rainbow flag outside a subway station.
This year’s march comes as migrants from the Middle East and elsewhere have gathered at the border with Belarus, trying to make their way into Poland, an E.U. nation — a crisis Western officials say the leader of Belarus has orchestrated.
The Polish government, led by Law and Justice, a conservative nationalist party, has used the crisis to rally support within the European Union, with which its relations had previously been badly strained by arguments over the rule of law, L.G.B.T. rights and other issues.
But the underlying tensions with the bloc remain.
And Independence Day has long been a flash point between feuding political groups within Poland.
The opposition had planned to hold its own rival march, but a women’s group organizing that event announced on Wednesday that it had decided to cancel it to avoid the risk of a violent confrontation with the nationalists. It accused the government, which endorsed the nationalists’ march despite court orders prohibiting it, of openly siding with “neo-fascists.”
In 2017, demonstrations by right-wing groups involved violent clashes with the police and made international headlines when demonstrators chanted, “Pure Poland, white Poland,” and “Refugees, get out!”
A year later, leaders from Poland’s ruling party joined with far-right groups.
As the march became a point of friction with the local government in Warsaw, led by a liberal opposition party, city authorities challenged the registration of the far-right march in court and won both the first case and an appeal.
Zbigniew Ziobro, the country’s prosecutor general and also the justice minister, said the court rulings were wrong and “restricted the constitutional freedom of assembly.”
The head of the Office for War Veterans and Victims of Oppression said he had given the march formal status this week, allowing it to move ahead.