The ESB said there has been no breach of its computer system after hackers targeted it.

The National Cyber Security Centre (NCSC) has confirmed it is working with the ESB on the issue but can not release any details for security purposes.

It is understood hackers sent an email to an ESB engineer in Donegal in what is referred to as a "spear phishing" attack.

This is when hackers send an email to an individual which looks like it is from a trustworthy source thereby encouraging the recipient to click on the link.

In this case the engineer was suspicious of the email and reported it to a security team.

A spokesperson for the ESB said it does not comment publicly on specific operational matters related to cyber security.

In a statement the company said: "The security of ESB's computer and electricity control systems is a key priority for ESB. As such, all threats to our systems are treated with the utmost seriousness and managed in accordance with this principle."

It said: "ESB employs a range of cyber security measures to protect from such attacks and is continuously collaborating with national bodies and others in the utility and security industries to address current and emerging threats."

Security experts believe the hackers may have links to Russia, saying this failed attack matches a pattern emerging across Europe.

The Department of Communications said it will be bringing forward legislation to further strengthen protections around critical national infrastructure shortly.

In a statement it said: "This legislation will oblige key service providers to take specific security measures, and to report incidents to the NCSC. The NCSC will also continue to develop its own capacity to engage in this space, and has recently completed a significant recruitment process with that end in mind."