Mr. Maassen himself has hardly diminished the organization’s right-wing reputation. This year, a defector from Alternative for Germany accused him of having advised the party’s former co-leader on how to avoid surveillance. Mr. Maassen was never charged, but even the hint of such a link is detrimental to the state’s legitimacy. A constellation of forces is now relearning to cooperate: right-wing street movements, right-wing news outlets, a fully fledged political party and a murky portion of the state bureaucracy.

So in a sense, Horst Seehofer, Germany’s interior minister and Mr. Maassen’s sympathetic boss, is not wrong when he calls Mr. Maassen a “classic civil servant.”

Mr. Seehofer has proved Mr. Maassen’s most important ally, raising questions about the interior minister’s own pandering or fealty to the far right. For Mr. Maassen’s professional breach, Ms. Merkel’s fragile coalition agreed to remove him from his post as head of German intelligence. Yet instead of demoting him — or outright firing him — the coalition effectively promoted him. His new job as state secretary came with a salary increase. In reaction to the public outcry, he was shuffled once again, this time to become “special adviser” to Mr. Seehofer.

Mr. Seehofer is the fiercest critic of Ms. Merkel within her governing coalition. “Migration is the mother of all problems,” he recently declared. But Ms. Merkel needs his party, the Christian Social Union, to form the right flank of her government. He, in turn, believes he needs to appeal to the far more right-wing elements in his own party, which faces a challenge in this month’s regional Bavarian election from the Greens and, crucially, Alternative for Germany. Evidently, Mr. Seehofer considers the disgraced Mr. Maassen a valuable electoral asset for keeping his conservative bona fides intact.

The entire affair is only one in a series of events that have marked a change in the public perception of the far right in Germany. Only two years ago, many right-wing politicians were still reluctant to officially endorse nationalist, anti-immigrant street movements such as Pegida. Now it is normal for not only Alternative for Germany politicians to back them officially, but even members of the putative political center to make shows of sympathy. Wolfgang Kubicki, vice chairman of the liberal Free Democratic Party, was quick to attribute “the roots of the riots” in Chemnitz to Ms. Merkel’s policy of admitting refugees and asylum seekers in 2015.

For decades, the right-wing elements in the German state never had the opportunity to cooperate with a major party that shares its views. Now they do.

For hundreds of civil servants, the rise of Alternative for Germany has presented an opportunity to engage in more right-wing political activities than would have been possible only a few years ago. A senior public prosecutor in Berlin, a judge in Dresden, as well as police officers and teachers across the country: For all of them, supporting the party serves as the bridge between the functioning state apparatus and the far right.

Very often, the party’s members draw connections between their profession and what they take to be the necessity of right-wing activism. They spread rumors of the government’s secret commands to prioritize anti-right policies over the solving of crimes committed by refugees or the “left-green indoctrination of students” in public schools. Their conspiracy theories have not diminished with their proximity to power. The future is a dark one when a right-wing party surges and finds sectors of the state full of “classic civil servants.”

Thomas Meaney is a fellow at the American Council on Germany. Saskia Schäfer is an assistant professor at Humboldt University in Berlin.