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

MAINZ, Germany — Germany is preparing to train troops to be deployed within its borders for the first time since World War II amid fears of terrorist attacks.

The country's armed forces will hold joint drills with police early next year, officials confirmed.

Defense Minister Ursula von der Leyen speaks with soldiers at a base in Ohrdruf, Germany, on Aug. 9. MARTIN SCHUTT / EPA

Authorities stress that counterterrorism measures will primarily remain the responsibility of police.

However, the potential for large-scale attacks have made the use of German military assets “conceivable, even probable,” according to Lt. Gen. Martin Schelleis, the Bundeswehr’s chief of joint support services.

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.

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

A 2012 constitutional court ruling paved the way for the deployment of the Bundeswehr on German streets in the aftermath of an attack.

Special Report: How Europe Is Confronting Terrorism

Until then, Germany's constitution had allowed for domestic military missions only under special circumstances — such as natural disaster relief.

The restrictive legal framework was instituted as a result of Nazi leader Adolf Hitler’s abuse of state powers.

Schelleis suggested that a terrorist attack could qualify as "such a grave disaster" to allow the armed forces to support the police.

"What matters in a large-scale terrorist situation is that quick and effective action is taken," he told NBC News. "This calls for the procedures to be coordinated and practiced."

Schelleis added the military assistance on offer could include low-altitude air space surveillance, checkpoints, explosive ordnance disposal and even advice on nuclear, biological and chemical threat situations.

“We could also provide mobile laboratory capabilities,” Schelleis said. “Our troops are excellently trained. The same applies to medical personnel, who are well versed in treating gunshot and burn injuries."

Lt. Gen. Martin Schelleis (right) is the Bundeswehr's chief of joint support services. R. Alpers / Bundeswehr

The joint exercises are due to take place in February in four German states.

Debate over deploying the Bundeswehr inside Germany has raged for years — with some high-ranking officials still not convinced that the threat from ISIS and other extremist groups warrant such a change in approach.

Following a shooting rampage in Munich in late July, German Foreign Minister Frank-Walter Steinmeier told the Passauer Presse newspaper that the “incident showed the speed and the great degree of professionalism of the police forces.”

He added: “There were no gaps that could or needed to have been filled by the Bundeswehr."