The Sueddeutsche Zeitung newspaper reported on Tuesday that hackers had breached the networks of NetCom BW last summer, but did not gain access to the computer system it uses to control energy supplies. The hack was not publicly disclosed at the time.

Germany's BSI federal cyber agency on Wednesday said it had assessed the incident and that there was no evidence to suggest that the company's operations had been affected.

"The Chief Federal Prosecutor has opened a preliminary investigation in connection with the incident," it said, without naming the company involved or providing additional details.

A spokesman for the prosecutor's office confirmed the investigation was underway but gave no further details.

A spokeswoman for EnBW confirmed the incident in a statement, but said it was detected early and caused no damage.

"Unknown people attacked the telecommunications network of the EnBW subsidiary NetCom. The attackers breached the network by hacking the portal used by an external service provider and had access to a limited portion of the internet traffic for a period of a few minutes," she said.

"No damage was caused as a result," she said, adding that the company immediately notified government authorities.

(Reporting by Andrea Shalal and Thorsten Severin in Berlin and Christoph Steitz in Frankfurt; Editing by Raissa Kasolowsky)