A brute force cyber attack on the UK parliament that compromised MPs' email accounts was carried out by Iran, it has emerged.
Blackmail fears were raised when hackers tried to break into the system used by MPs, peers and staff by searching for weak passwords.
Around 90 of the 9,000 email accounts were undermined in the "sustained and determined" attack in June.
Russia faced accusations it was behind the attack but investigators have traced the source of the hit to the Tehran regime, according to The Times.
The UK House of Commons said it did not comment on security matters.
A National Cyber Security Centre spokesman said: "It would be inappropriate to comment further while enquiries are ongoing."
The revelations come as Britain tried to keep the Iran nuclear deal on track after Donald Trump's refusal to back it.
The US president accused Tehran of violating the spirit of the landmark 2015 agreement and believes the international community is being naive in its dealings with the regime.
Theresa May joined Germany's Angela Merkel and France's Emmanuel Macron to issue a statement insisting preserving the pact was "in our shared national security interest" and calling for Washington to "consider the implications" of taking action that undermine it.
Mr Trump stopped short of ripping up the deal but said without measures to toughen it up "the agreement will be terminated".
The statement from the UK, France and Germany said the International Atomic Energy Agency (IAEA) had "repeatedly confirmed" Iran's compliance to the terms it signed up to.
It said: " We, the leaders of France, Germany and the United Kingdom take note of President Trump's decision not to recertify Iran's compliance with the Joint Comprehensive Plan of Action (JCPoA) to Congress and are concerned by the possible implications.
"We stand committed to the JCPoA and its full implementation by all sides. Preserving the JCPoA is in our shared national security interest.
"The nuclear deal was the culmination of 13 years of diplomacy and was a major step towards ensuring that Iran's nuclear programme is not diverted for military purposes."
Shadow foreign secretary Emily Thornberry accused Mr Trump of an "act of wanton vandalism" and said it was "high time" the Government stopped kow-towing to the US president and challenged him on his actions.
She said: "I t is an act of wanton vandalism for Donald Trump to jeopardise the future of that deal today, and to move the goalposts by linking it to important but utterly extraneous issues around Iran's wider activities in the region.
"It is also totally disingenuous to suggest that the deal just needs to be fixed, when the only evidence that it is any way broken is inside Donald Trump's head.
"Yet sadly, this kind of reckless and thoughtless behaviour is what we have come to expect from this president.
"From the Paris climate change deal to US membership of Unesco, he has demonstrated a flagrant disregard for the institutions and agreements that bind the international community together in the shared pursuit of a better future.
"That is not what we expect from the President of the United States, and it is high time for the British Government to tell him so.
"Because yet again, this shows that the strategy of kow-towing and hand-holding operated by the Prime Minister and Foreign Secretary has utterly failed, and they have once more allowed our so-called closest ally to treat them like fools.
"When he fooled Theresa May and Boris Johnson on climate change, we can say shame on him, but now the same pair have been fooled on Iran as well, we can only say shame on them."