Investigators had initially blamed Russian Federation or North Korea for the June 23 hack, which saw the account passwords of dozens of MPs and senior ministers, including May, sold online.

The accounts that were hit include those belonging to Prime Minister Theresa May and other cabinet ministers, according to the Times, which based its report on a secret intelligence assessment.

The reasons behind such attack are unknown, but experts reportedly suggested that Iran's Islamic Revolutionary Guard Corps might have carried out the attack to undermine the nuclear deal as it wants Tehran to continue its weapons program. "The nature of cyber-attacks means it is notoriously hard to attribute an incident to a specific actor".

While the motive for the attack has not yet been established, the hackers were not seeking simple financial profit, The Times said.

The attack from Iran shows the nation is stepping up to be one of the world's major cyber powers.

Whitehall has since admitted that the hackers had obtained sensitive material, according to The Times' report.

In a speech at the White House, Trump accused Iran of violating the "spirit" of the deal and said the US would not "take lightly" the country's "sinister vision for the future".

The revelation that Tehran may have directed the attack comes as May had sought to pressure US President Donald Trump to uphold a 2015 nuclear deal with Iran.

May, along with German Chancellor Angela Merkel and French President Emmanuel Macron, issued a joint statement in which they declared that they are committed to the Iran deal and its full implementation.

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 United Kingdom interests or information on elected officials that could be used for leverage.