A brute force cyber attack on 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 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.