Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Part Three in a Series

MAINZ, Germany — A week-long spate of violent attacks this summer — including two involving migrants — has triggered debate about potentially deploying troops on Germany's streets for the first time since World War II.

A July 18 ax and knife attack by an ISIS-inspired 17-year-old Afghan asylum-seeker aboard a train near Wuerzburg left five people seriously injured. It also raised questions about whether new security measures were needed in Germany.

"There are scenarios we couldn’t imagine before the attacks of Paris or Brussels but that we must address openly"

Six days later, a Syrian failed asylum-seeker blew himself up outside a popular music festival in the southern city of Ansbach, wounding dozens. Authorities later said said he had pledged allegiance to ISIS in a video.

“Islamic terror has reached Germany,” Bavaria's state interior minister Winfried Bausback wrote on Facebook following that attack.

A teen's shooting rampage at a mall in Munich on July 22 was not linked to any terrorist group but also rattled nerves across the country.

Europe's economic powerhouse took in 2.1 million immigrants last year — the equivalent of the city of Houston, Texas. Refugees made up more than half of that total — including many who survived perilous journeys across the Mediterranean Sea after fleeing conflict zones including Syria.

German Chancellor Angela Merkel has confidently maintained that "we can do this" and her unwavering stance of welcoming Syrians has won international acclaim.

While other European leaders built fences along borders and ordered the use of force against migrants, Merkel told reporters that "fear can't be a good counsel for political action" and vowed to continue giving shelter to refugees.

Plans to involve soldiers in counterterrorism operations — and the suggestion troops could also be used to beef up security in public places — have proved controversial in a country only seven decades removed from totalitarian rule that's still grappling with guilt from the Nazi era.

Wolfgang Bosbach, a lawmaker from Merkel's CDU party, dismissed any such concerns.

“During the recent terror threat in Munich the German armed forces, and also the military police, were put on alert,” he told NBC News. “They have been deployed in other crises, so why should the military not help with domestic security as well?”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A court decision in 2012 allowed Germany's armed forces to be deployed at home for peacetime missions under an “extraordinary emergency situation of catastrophic dimension."

"Bundeswehr" soldiers have since helped during flooding as well as providing logistical support during the migrant crisis.

Last month's attacks also sparked political discussion about potential new security laws, including proposed measures that would make it easier to deport foreigners deemed to be dangerous.

Interior Minister Thomas de Maiziere suggested earlier this month that dual nationals who fought for terror groups abroad should lose their German citizenship.

He also told the mass-circulation Bild newspaper that he wanted to introduce facial recognition software at airports and train stations to help identify terror suspects.

De Maiziere vowed to create 4,600 new police posts by next year and increase spending on security-related issues by more than 2 billion euros ($2.3 billion) by 2020.

German police guard a train near Wuerzburg following the slashing spree on July 18. KARL-JOSEF HILDENBRAND / EPA

According to Germany’s BfV domestic intelligence service, around 850 people have left Germany to fight in Syria and Iraq — 280 have returned, including 70 who had received combat training while abroad.

While some politicians suggested the influx of migrants and refugees had created security risks and called for tighter border controls, others warned against overreacting.

Boris Pistorius, the justice minister in the state of Lower Saxony, told Die Welt newspaper that the three incidents in a week span “should clearly be distinguished” and that he would refrain from describing “the series of very different attacks as a wave of violence.”

He added: “We are not there yet.”

But De Maiziere stated that Germans are “living in difficult times” and that police forces are already “overstretched.”

Defense Minister Ursula von der Leyen recently announced that the German military would conduct counterterrorism training with police later this year.

“There are scenarios we couldn’t imagine before the attacks of Paris or Brussels but that we must address openly and for which we must prepare," she said.

German Defense Minister Ursula von der Leyen speaks with a soldier on Aug. 10. RALPH ORLOWSKI / Reuters

With an overall contingent of under 200,000 personnel, the country's armed forces are spread thin while fulfilling peacekeeping missions in Afghanistan, Kosovo, Mali and in the the Mediterranean Sea.

According to the German Armed Forces Association, many servicemen don't want to be used as “stopgaps at home.”

“We favor the planned training under the leadership of police forces in order to assess a potential role of the armed forces in a large-scale terror scenario,” said Lt. Col. André Wuestner, the group's head. “But it should not be our goal to protect train stations."

Wuestner said his counterparts in France and Belgium have warned that their domestic security duties — such as patrolling city centers — have kept them from training for their main responsibilities, such as missions abroad.

German soldiers after taking part in a drill on June 29. JOHN MACDOUGALL / AFP - Getty Images

The head of Germany’s police union suggested that better equipment and weapons offered a better answer than troops on the streets of Berlin, Frankfurt and Hamburg.

“What we don’t need is for that the armed forces to fill a personnel gap, which would lead to a militarization of inner security,” Rainer Wendt said.

Christian Moelling, a security expert at the German Marshall Fund of the United States, told NBC News that conservative politicians appeared to be trying to capitalize on recent events as they sought to achieve their longstanding goal of allowing the military to deploy within the country’s borders.

He noted that since the end of World War II, high hurdles had been established governing how the armed forces can be used and was skeptical that any push to change that would be successful.

“To use Germany’s military for interior security, including the use of force, would necessitate a large majority for a constitutional change, and this majority doesn’t exist,” Moelling said, adding that at least two-thirds of parliamentarians would have to approve such a measure.