BERLIN — Germany’s domestic intelligence agency took a first step on Tuesday toward placing the far-right Alternative for Germany party under surveillance as a threat to the country’s democracy, announcing that it would formally observe its youth wing, which it called “extremist.”

It was the first time in Germany’s postwar history that a party seated in parliament was put under such scrutiny, setting the stage for a looming battle between the state and a party whose strength has steadily grown even as its suspected associations with neo-Nazi groups have stirred concern.

The leaders of Alternative for Germany, or AfD, as the party is known, routinely attack the press, accuse Muslim immigrants of being criminals, and question the principles of liberal democracy.

[Read: Germany shooting is deadliest yet in upsurge of far-right attacks in the country.]

The warning on Tuesday was issued by the Federal Office for the Protection of the Constitution, an agency whose founding mission when it was established after World War II was to protect against the rise of political forces — primarily another Nazi party — that could once again threaten Germany’s democracy.