Millions of zlotys were quickly collected to help the two wounded police officers who confronted the gunman.

One, Jakub Kulik, has been named as the hero of the drama. Social media images showed him shooting and wounding the gunman despite being hit himself.

“Our highest praise goes to the heroic police officers who risked their lives in the line of duty,” said Prime Minister Donald Tusk.

Police had appealed for blood donors to help Kulik “who without hesitation confronted an armed attacker”. Long queues formed outside donor centres that were besieged with offers and said they could not cope.

But behind the solidarity and the pride, people know that Poland, already close to the frontline of the Ukraine-Russia war, has now changed.

This was also “an attack on Poland, on our way of life,” the centrist Rzeczpospolita daily wrote in an editorial.

It was an attack on “a value we held so dear — that sense of security, which, as it turns out, was merely an illusion,” added commentator Boguslaw Chrabota in the editorial.

Chrabota accused Polish politicians of fostering divisions within a country where centrist prime minister is battling nationalist President Karol Nawrocki and a vociferous far right.

“Polish Breiviks are emerging,” warned Chrabota, referring to the neo-Nazi Anders Behring Breivik, who killed 77 people in Norway on Jul 22, 2011.