In this photo taken through a window of the conference hall, German Chancellor Angela Merkel, center, addresses the media during a news conference in Berlin, Germany, Thursday. (Markus Schreiber/AP)

With Germany stunned by a series of bloody attacks, Chancellor Angela Merkel called Thursday for an “early warning system” to detect radicalization among asylum seekers even as she insisted that the nation still has a moral duty to offer sanctuary to those fleeing war.

In her most comprehensive remarks since a wave of violence this month, Merkel described new fears gripping Europe. She said Germans were now locked in “a struggle, or a war, if you like” with the Islamic State, but could not turn their back on people in genuine need.

The welcome-mat policies of Merkel’s government have come under increasing criticism and demands for review. Germany has taken in more than 1.3 million refugees, asylum seekers and others since last year, including many fleeing war in Syria and elsewhere.

But even some former supporters of the policies have raised questions after four assaults in the span of two weeks — including two involving asylum seekers who had pledged allegiance to the Islamic State.

“Fear cannot be the guide for political action,” Merkel said.

“I didn’t say this was a going to be simple. That we could just do it. But I am still convinced that we can do it,” she added. “This is a historic test in a time of globalization.”

Yet she also called for new steps and faster implementation of existing decisions to improve national security. Merkel said she has spoken with President Obama about increasing intelligence cooperation — seeking to improve the lines of communication that have been tested since revelations in 2013 that U.S. intelligence had spied on the chancellor.

She additionally called for the army to begin training under the supervision of German police, so it could respond in the event of major terrorist attacks. In a nation still leery of army involvement in domestic affairs, given the Nazi and Cold War eras, her proposals are seen as significant.

An editorial published this week by Bayernkurier, the newspaper in Bavaria of the Christian Social Union, one of Merkel’s coalition partners, blasted her for opening the door to risk.

“The chancellor has subjected us to a security risk with her open borders and arms,” the editorial stated. “Tens of thousands of people of fighting age who haven't been properly registered are in our country. Of many of them, the state neither knows their proper name, nor their right age, nor their current place of residence.”

Merkel on Thursday reiterated plans to increase Internet surveillance and hire a consulting firm to examine Germany’s deportation system. She also called for tighter weapons laws to prevent the sale of guns on the Internet.

Yet Merkel is confronting a multifaceted spurt of violence that is deeply challenging the abilities of the German security services. Two of the perpetrators in four recent attacks — an Afghan teen who injured train passengers with an ax and a suicide bomber who killed himself and wounded 15 others near a music festival — had pledged allegiance to the Islamic State in videos released by the group. Investigators analyzing their cellular phones told the Deutsche-Presse Agentur on Thursday that the attackers, both asylum seekers, had been in contact with a person from the “Middle East” before carrying out their assaults.

In the deadliest attack so far — a mall shooting in Munich last Friday that claimed 10 lives, including that of the Iranian German gunman — authorities have become increasingly convinced that the perpetrator was instead motived by far-right and anti-migrant sentiments. Security sources told the Frankfurter Allgemeine newspaper that they had uncovered evidence that the shooter had raged against Turks and Arabs and expressed pride in having the same birthday as Adolf Hitler.

The shooter apparently bought his gun on the Internet, and Merkel on Thursday called for tighter weapons laws to prevent such sales in the future.

Following the attacks, Germany is now on edge. A local shopping mall in Bremen was evacuated on Wednesday after a 19-year-old Algerian allegedly made threatening references to recent attacks. Also on Wednesday, police in the central German city of Hildesheim raided a mosque and the homes of several congregation members suspected of spreading radical Islamist propaganda.

Yet Merkel offered few details on new measures, which she said would be discussed in the days and weeks ahead. She said her government would consider new funds for adding police, security personal and equipment.

The woman often called “Europe’s decider” is facing one of the toughest periods of her 11-year tenure. Her popularity ratings took a hit following the refugee crisis but had improved as recently as earlier this month. A new poll taken after the spurt of recent attacks and published by news broadcaster N24, however, showed that 57 percent of respondents believe that Merkel's refugee policy has failed. More than half of those questioned said she does not take the concerns of the population seriously enough.

Analysts said Merkel, who cut short her vacation to hold Thursday’s news conference, has done little to assuage the public’s concerns. Yet with no serious political rival on the horizon, they said she still appears poised to finish her mandate and run a strong campaign in elections next year.

“She came very late to the public on this, and I think she gave us no new news,” said Heinrich Oberreuter, a political analyst at Passau University. “The points she mentioned for the future are not very innovative. Better cooperation and strengthening administrative powers? It’s not a very a serious program, but nobody knows exactly what to do.”

Stephanie Kirchner contributed to this report.