Germany reportedly fended off two cyberattacks from Russian hacker group Fancy Bear, also known as APT28 or Strontrium, a top official said. The notorious group was accused of hacking the Democratic National Committee and Democratic candidate Hillary Clinton's presidential campaign last year as well attacking Germany's parliament in 2015.

Arne Schoenbohm, president of the Federal Office for Information Security (BSI), told Reuters that the first cyberattack came in May 2016 involving an attempt to create an internet domain for German Chancellor Angela Merkel's Christian Democratic Union party in the Baltic region. The second attack came months later in the form of a phishing scheme that targeted German parties in the Bundestag, the lower house of parliament. Using a Nato domain name, the hackers attempted to inject malicious software into the networks of German politicians.

"Germany remains in danger in the cyber arena since we are highly digitised," Schoenbohm told Reuters. "The more we digitise, the more dependent we become on networks, the greater the risk of attack."

Late last year, Germany's BfV intelligence agency warned of an alarming uptick in Russian propaganda and disinformation campaigns, aggressive targeted cyberattacks and evidence of attempts to influence the upcoming federal election. The agency also noted a "striking increase" in spear-phishing attacks linked to Fancy Bear.

In November, Merkel said she could not rule out the possibility of Russia attempting to meddle in the upcoming German election through cyberattacks and disinformation campaigns.

Earlier this year, BfV head Hans-Georg Maassen said Germany must be prepared to successfully counter any cyberattacks rather than simply protect its digital infrastructure.

"We think it's essential that we don't just act defensively, but that we are also able to attack the enemy so that he stops continuing to attack us in the future," Hans-Georg Maassen said.

In January, US intelligence agencies concluded that Russian President Vladimir Putin ordered a multifaceted campaign designed to undermine American democracy, hurt Clinton's bid for the White House and help Donald Trump win the presidency.

"We assess Moscow will apply lessons learned from its Putin-ordered campaign aimed at the US presidential election to future influence efforts worldwide, including US allies and their election processes," the agencies warned in a 25-page security report.

Washington formally accused Moscow in October last year of attempting to meddle in the presidential elections through cyberattacks targeting the DNC and top Democrats.

The Kremlin dismissed the allegations as "baseless and amateurish".

In the wake of the cyberattacks, multiple European countries including Germany and France have stepped up their cyberdefences against possible attacks and misinformation campaigns ahead of their forthcoming elections. Many European officials have already reported cyberattacks in recent months targeting the digital infrastructure of countries including Norway, Ukraine, France, Estonia, Bulgaria, Austria, Czech Republic and Italy.

Schoenbohm said the BSI was working hard to bolster Germany's defences against cyberattacks by monitoring government networks as well as educating local politicians and parties about protecting against such attacks.

"We give them advice and help them with certain measures," Schoenbohm said. "But in the end, what each party does is its own responsibility."