WARSAW, Poland — Poland’s prime minister is under fire for a speech at the Auschwitz Museum that appeared to defend her government’s refusal to accept refugees.

Beata Szydlo spoke Wednesday at ceremonies marking the 77th anniversary of the first deportation of prisoners to the Nazi concentration camp.

“Auschwitz is a great lesson in today’s turbulent time that everything must be done to protect the security and life of one’s citizens,” Szydlo said.

The quote was published on the official Twitter account of the ruling Law and Justice Party. It was removed after a few hours.

The comment spurred outrage throughout Poland, with many believing it to be a defense of the nationalist party government’s decision not to accept any refugees as part of a European Union plan to resettle migrants from Africa and the Middle East.

“Such words in such a place should never fall from the lips of the Polish prime minister,” the president of the European Council and former Polish Prime Minister Donald Tusk said in a tweet.

Polish writer Jacek Dehnel, who in 2011 was honored by the Israeli Embassy and the Polish Ministry of Culture for organizing a regular volunteer cleanup of the Jewish cemetery in Warsaw, wrote in a post on Facebook that “there should be no politics over the graves,” referring to the refugee crisis.

Dehnel noted wryly that Nazi SS head Heinrich Himmler “for the security of the citizens created a concentration camp.”

Opposition centrist leader Katarzyna Lubnauer said Szydlo had “exploited the cruelty of Auschwitz to make Poles afraid of refugees,” the BBC reported.

Government spokesman Rafal Bochenek said that bad intentions can be read into every statement, and the prime minister did not mean anything sinister in her statements at Auschwitz.

On Tuesday, the European Commission began legal proceedings against Poland, Hungary and the Czech Republic for failing to play their part in easing the migration crisis.