BERLIN — After allegations of Russian interference in the U.S. elections, officials here fear that an attempt to undermine German democracy may be next.

Germany’s top spy cautioned Tuesday that Russian hackers may seek to disrupt national elections next year, a warning that comes a day after a massive cyberattack targeted the routers of nearly 1 million Deutsche Telekom customers.

The German telecommunications giant was hit Sunday and Monday with what officials described as an “outside” hack on the Internet routers of hundreds of thousands of Germans. Government systems, German officials said, were not affected, but they were targeted by the attack, which tried to implant malware.

Asked whether the attack may have originated in Russia, as some experts have speculated, German Interior Minister Thomas de Maizière told the DPA news service: “It is possible that the line between criminal activities from a particular country and state activities cannot be clearly drawn. … At this point, the origin is not clear.”

But in an interview published Tuesday in the Süddeutsche Zeitung, Bruno Kahl, the head of Germany’s foreign intelligence service, known as the BND, raised serious concerns over the growing threat of cyberattacks either sponsored by or tolerated by Russia.

Asked about the charges by U.S. security agencies — and denied by Moscow — that Russian hackers had tried to influence the outcome of the U.S. election through the spread of misinformation, Kahl, said, “We have indications that it is coming from this direction, yes.”

“Naturally, it is technically difficult to attribute it to a state actor,” he added. “But a lot indicates that this is tolerated or desired on the side of the state. … The perpetrators have an interest to delegitimize the democratic process as such. I have the impression that the result of the American elections, so far, has not been a cause for mourning in Russia.”

He said Germany has and will probably continue to be a target.

“Europe is in the focus of these attempts of disturbance, and Germany to a particularly great extent,” he said. “I don't want to say that we're exclusively on the list of target countries. Elections are coming up in other European countries as well.”

He added, “We have evidence that cyberattacks are taking place that have no other purpose than triggering political uncertainty.”

German officials have pointed the finger at Russian hackers for a Trojan virus attack in August and September that hit the systems of two political parties, the conservative Christian Social Union in Bavaria and the Left Party. Chancellor Angela Merkel last week warned that “social bots” — or programs that spread fake news and sway opinions on social media — may be deployed against her reelection campaign next year.