BERLIN (Reuters) -Germany has recalled its ambassador to Russia after Berlin accused Moscow of launching cyberattacks on its defence and aerospace firms and ruling party, a spokesperson for the foreign ministry said on Monday.

"The foreign minister has recalled Ambassador (Otto) Graf Lambsdorff to Berlin for consultations" after Berlin attributed a cyberespionage campaign to APT 28, a group linked to Moscow's GRU military intelligence agency, the spokesperson said.

The move is in line with diplomatic protocol and Lambsdorff will remain in Berlin for one week before returning to Moscow, the spokesperson added.

The Russian Foreign Ministry and Russia's embassy in Berlin did not immediately respond to requests for comment.

The accusations come amid heightened anxiety in Europe over suspected Russian hackers and spies since Moscow's invasion of Ukraine in 2022, and in the run-up to European elections.

Berlin said the attacks that started two years ago targeted Germany's governing Social Democrats as well as companies in the logistics, defence, aerospace and IT sectors. It has not provided details of the damage caused for security reasons.

The APT28 group - also known as "Fancy Bear" - exploited a then-unknown vulnerability in Microsoft Outlook in order to compromise email accounts, according to German authorities.

The campaign also affected other countries including the Czech Republic, Lithuania, Poland, Slovakia and Sweden.

Relations between Russia and Germany, which used to be the biggest buyer of Russian oil and gas, have broken down since Moscow's invasion of Ukraine in February 2022.

Germany will not be represented at the inauguration of Russian President Vladimir Putin on Tuesday for his next six-year term in office, a spokesperson for the foreign ministry said.

(Reporting by Friederike Heine, Editing by Miranda Murray, Rachel More and Bernadette Baum)