TOKYO/WASHINGTON - UN refugee chief Antonio Guterres warned Thursday that closing borders on Muslims fleeing violence by Islamic State is counterproductive and only risks helping the group grow stronger.

Guterres’ speech in the Japanese capital to an audience of diplomats, NGOs and university students came as European countries are increasingly inclined towards tightening immigration rules in the worst refugee crisis the continent has faced since World War II.

“The idea that Europe can announce the closure of borders to Muslim refugees or reject Muslim refugees is only an argument that will suit perfectly Daesh in its campaigns against Europe,” Guterres said, using another name for IS.

Policies that try to keep refugees out could also assist it “to recruit people in the same European countries,” he added. “It’s necessary to look at the complexity of the security situation and understand that the problem does not come from refugee movements,” he added.

Concerns about security have increased further since IS attackers killed 130 people in Paris this month in the worst such violence on French soil.

The November 13 attacks have stirred fears in Europe and North America that militants could try to blend in with refugees to gain entry to Europe or the US and strike later. Sweden, one of the most open European countries with 80,000 asylum applications received in the past two months, said Tuesday it would drastically tighten its asylum rules in a bid to stem the flow of migrants coming to the country. A former Portuguese prime minister, Guterres reiterated comments made Wednesday that the Paris attacks cannot be blamed on refugees, stressing that the perpetrators were “home-grown”.

“It is always possible for a terrorist organisation to try to infiltrate a (refugee) movement that is not properly controlled,” he said. Guterres, the UN High Commissioner for Refugees who is due to complete his 10-year tenure at the year-end, added: “Refugees are the victims of terrorism, and the refugee movements are the consequence of terrorism.”

Guterres is due to step down at the end of this year, with Italian diplomat Filippo Grandi appointed to take up the job as of January 1.

Meanwhile, President Barack Obama urged Americans to show generosity to Syrian refugees in a Thanksgiving message on Thursday, reminding them that the Pilgrims who came to America in 1620 were themselves fleeing persecution.

Obama’s plan to accept 10,000 refugees from Syria has drawn political criticism since attacks in Paris two weeks ago that killed 130 people, and which Islamic State claimed responsibility for. The United States is leading an international coalition fighting the group in Syria and Iraq.

“Nearly four centuries after the Mayflower set sail, the world is still full of pilgrims - men and women who want nothing more than the chance for a safer, better future for themselves and their families,” Obama said.

Since the Paris attacks, Americans have identified terrorism as the nation’s top problem, Reuters-Ipsos polling shows.

The US House of Representatives passed a bill to suspend the refugee plan and intensify refugee screening measures before lawmakers left Washington for the Thanksgiving break. Several Republican candidates for the November 2016 presidential election have also said refugees pose a risk.

Obama has argued refugees will be well screened.

“People should remember that no refugee can enter our borders until they undergo the highest security checks of anyone traveling to the United States,” he said in his address to mark Thanksgiving, a holiday that Americans trace back to celebrations by the country’s early immigrants.

Obama has vowed to veto the House refugee bill. But the White House has said it is open to working with lawmakers on tighter security measures for visitors from 38 countries who do not need a visa for short US visits.

In his address, the president quoted from letters he had received from Americans welcoming Syrian refugees.

“One woman from Pennsylvania wrote me to say, ‘Money is tight for us in my household ... But I have a guest room. I have a pantry full of food. We can do this,’” Obama said.

“Another woman from Florida told me her family’s history dates back to the Mayflower - and she said that welcoming others is part of ‘what it means to be an American,’” he said.

Several governors have said they do not want to accept Syrian refugees.

On Thursday, the mayor of Louise, Mississippi told CNN it is welcoming refugees from war-torn countries, including Syria, to send a positive message instead of one driven by fear.

Ruffin Smith said so far no refugees have arrived: “We’ve made ourselves available. I feel from a small town we’ve done what we can do.”