A Russian-backed hacking group known for many high-level cyber attacks was able to infiltrate the German government's secure computer networks, according to reports.
The dpa agency cited unidentified security sources saying the group APT28 hacked into Germany's foreign and defence ministries and managed to steal data.
The attack was first noticed in December and may have lasted a year, dpa reported.
The interior ministry said "within the federal administration the attack was isolated and brought under control".
The ministry said it is investigating.
APT28, which has been linked to Russian military intelligence, has previously been identified as the likely source of an attack on the German Parliament in 2015, as well as on Nato and governments in eastern Europe.
Also known by other names including "Fancy Bear", APT28 has also been blamed for hacks of the US election campaign, anti-doping agencies and other targets.