Iran is to blame for the "brute force" cyberattack on the UK Parliament over the summer that hit the email accounts of dozens of MPs, according to an unpublished assessment by British intelligence. On June 23, hackers hit the British Parliament with a "sustained and determined" 12-hour long cyberattack that targeted thousands of email accounts, including those belonging to Prime Minister Theresa May and other senior ministers.

The attack compromised 90 email accounts, less than 0.5% of the parliament's 9,000 email addresses. Officials said hackers targeted parliamentary accounts with "weak" passwords that "did not conform to guidance issued by the Parliamentary Digital Service".

Initially, Russia was suspected to have carried out the attack. However, investigators said the evidence now pointed to Iran, according to the report first revealed by the Times. The cyberattack would be Tehran's first significant one on the UK.

"It was a brute force attack," a security source told The Guardian in June. "It appears to have been state-sponsored. The nature of cyberattacks means it is notoriously difficult to attribute an incident to a specific actor."

Although the motive for the attack is still unclear, the publication reported that the theories being investigated include "classic cyberespionage" to unearth material that could harm UK interests or information on elected officials that could be used for leverage.

"It was not the most sophisticated attack but nor did it need to be," a source told the Times. "It is possible they were simply testing their capability."

The perpetrators behind the attack reportedly left some form of digital footprint or "calling card".

The National Crime Agency (NCA) and National Cyber Security Centre (NCSC) are currently investigating the cyberattack and who was responsible for it.

"It would be inappropriate to comment further while inquiries are on-going," an NCSC spokesperson said.

The news comes as US President Donald Trump refused to certify the landmark 2015 Iran nuclear deal, which he has continued to describe as a "terrible" deal. The president accused Iran of sponsoring terrorism and "not living up to the spirit" of the nuclear agreement.

However, European leaders, including May, want to retain the deal.

In a rare joint statement, May, Germany's Angela Merkel and France's Emmanuel Macron said the nuclear deal was in their countries' "shared national security interest" and said that they remained committed to the agreement "and its full implementation by all sides".

"We encourage the US Administration and Congress to consider the implications to the security of the US and its allies before taking any steps that might undermine the JCPoA [Joint Comprehensive Plan of Action], such as re-imposing sanctions on Iran lifted under the agreement."

Federica Mogherini, the foreign policy chief of the European Union, said the US cannot unilaterally terminate the agreement.

"We cannot afford, as the international community, to dismantle a nuclear agreement that is working," Mogherini told reporters in Brussels. "This deal is not a bilateral agreement, this is not an international treaty... so it is clearly not in the hands of any president of any country in the world to terminate an agreement of this sort.

"The president of the United States has many powers, but not this one."