Preparations for Sunday’s centenary of the restoration of Polish independence descended into farce this week with a bewildering series of events surrounding a nationalist march due to take place in central Warsaw.

The March of Independence, organised by nationalist and far-right groups and held annually in the Polish capital on 11 November to commemorate the anniversary of the re-establishment of Poland’s independence in 1918, has grown dramatically in scale over the past decade, attracting activists from across Europe.

Last year’s event, which attracted an estimated 60,000 people, received widespread international condemnation for the presence of racist and xenophobic banners and slogans and instances of violence directed at counter-protesters. This year’s event, which was expected to attract an even bigger turnout, threatened to overshadow official state commemorations.

On Wednesday Hanna Gronkiewicz-Waltz, Warsaw’s outgoing mayor and a leading figure in the opposition Civic Platform party, announced that the march would be banned, citing concerns over security and expressions of hatred.

“Warsaw has already suffered enough due to aggressive nationalism,” she said. “Poland’s 100th anniversary of independence shouldn’t look like this, hence my decision to forbid it.”

The organisers of the march lodged an appeal against the ban and said they intended to march regardless. “The March of Independence will take place, as it does every year,” said Robert Winnicki, leader of the far-right National Movement. “Liberal despotism will not rob Poles of the possibility to celebrate.”

Hours after the mayor’s announcement, Andrzej Duda, Poland’s rightwing president, said the Polish state would be organising its own march at the same time and along the same route as the banned march, effectively assuming direct control of the event.

The move appeared to be an improvised solution to a longstanding dilemma for Duda, who has often courted Poland’s nationalist youth and has spent recent months weighing up whether or not to participate in the march.

Duda and the government had been engaged in negotiations with the organisers in the hope that they could be persuaded to march under state auspices in return for agreeing not to allow racist or extremist banners. The talks broke down but Gronkiewicz-Waltz’s announcement gave the government a pretext to intervene.

“The mayor’s decision was a blessing for Duda and the government because it allowed the liberal opposition to take the blame from the nationalists for banning their march, whilst avoiding the possibility of a neo-fascist festival being held on the centenary of our independence,” said Michał Szułdrzyński, a columnist with Rzeczpospolita, a centre-right broadsheet.

But the decision of the authorities to assume control of the event has sparked widespread concern, which was exacerbated on Thursday night when a Warsaw court overturned the mayor’s ban, arguing that it contravened the right to assembly. It is unclear whether by taking control of the event in the meantime the state authorities have effectively banned the far-right movements from their own march, and on what legal basis.

The confusion is playing out against the backdrop of security fears, after mass protests by Polish officers and other security officials. Prevented by Polish law from going on strike, police officers held a large demonstration in Warsaw last month and have been taking sick leave en masse, leading to severe shortages across the country.

The government said the defence ministry had assumed responsibility for security at the march and extremist symbols would be banned, raising the prospect of confrontations between radical groups and military personnel on the streets of Warsaw. The US Embassy in Warsaw has issued a security alert advising citizens to avoid the march route.

“The downside for the authorities of the state assuming responsibility for what happens on Sunday is that if anything goes wrong, there will be no one else to blame,” Szułdrzyński said. “Instead of being full of excitement and happiness, we are fearing for the safety of people in our capital.”