Officials are baffled that a seemingly wacky conspiracy theory about Mr. Trump taking on a “deep state” of Satanists and pedophiles has resonated in Germany. Polls show that trust in Ms. Merkel’s government is high, while the far-right Alternative for Germany party, or AfD, has been struggling.

“I was astonished that QAnon is gaining such momentum here,” said Patrick Sensburg, a lawmaker in Ms. Merkel’s conservative party and member of the intelligence oversight committee. “It seemed like such an American thing. But it’s falling on fertile ground.”

The mythology and language QAnon uses — from claims of ritual child murder to revenge fantasies against liberal elites — conjure ancient anti-Semitic tropes and putsch fantasies that have long animated Germany’s far-right fringe. Now those groups are seeking to harness the theory’s viral popularity to reach a wider audience.