Boris Johnson has said the conduct of ex-police officers in revealing information against Damian Green has the “slight feeling of a vendetta” and said he hoped the now ex First Minister would be able to return to government eventually.

Mr Green, Theresa May’s deputy resigned last night after he was found to have been dishonest in his claims not to know that pornography had been found on his computer.

Mr Johnson raised concerns that the former first secretary of state may have been the victim of a “vendetta”, describing the leak of secret details from a police raid of his parliamentary offices as “a bit whiffy”.

The Foreign Secretary added his voice to calls for further investigation of the way police evidence about the discovery of legal porn on Mr Green’s work computer found its way into the press.

Speaking during a visit to Moscow, Mr Johnson said: “I’m very sad for Damian and I think he has been a fine public servant and done a great job, and hopefully one day he will come back and continue to serve in other ways.

“I think plainly, judging by the exchange of letters, he agreed that he had broken the ministerial code so the result was inevitable.

“But I think it was a bit whiffy, frankly, this business with whatever happened with the information from his computer.

“I don’t quite see why that was brought into the public domain in the way it was. I think it needs to be investigated further, as the Prime Minister was saying.

“It had the slight feeling of a vendetta.”

The two police officers who revealed details of pornography found on computers inside Damian Green’s parliamentary office could face prosecution over the leaking of the information.

Bob Quick, former Assistant Commissioner of the Metropolitan Police, told the media “extreme” material was found in a 2008 investigation into unrelated Home Office leaks.

Neil Lewis, who was a Detective Constable in the force, later said he was “shocked” to find thousands of legal pornographic images on Mr Green’s computer that indicated prolific web browsing.

Mr Green denied the claims and alleged they were biased, but was forced to resign on Wednesday night over his “inaccurate and misleading” statements on the scandal.

Scotland Yard said the officers had been referred to the Information Commissioner’s Office (ICO) over the disclosure of “confidential material gathered during a police investigation”.

A spokesperson said legal advice had been sought over how best to take action against Mr Quick and Mr Lewis nine years after the original probe.

“It was determined that the most appropriate course of action was to make a referral to the ICO to carry out a further investigation in relation to potential Data Protection Act offences,” he added.

“The Met is clear that confidential information gathered during any police inquiry should remain confidential. That is an enduring confidentiality regardless of whether an officer leaves the service.”

Elizabeth Denham, the Information Commissioner, confirmed the authority would be investigating under its powers to enforce data protection.

“We will be looking at whether individuals acted unlawfully by retaining or disclosing personal data,” she added.

“These are serious allegations and we are investigating to determine whether the law has been broken and what further action is necessary including potential criminal prosecution.”

Mr Green continues to deny downloading or viewing pornography himself but was sacked for breaching the ministerial code by making “inaccurate and misleading statements” as the scandal broke in early November.

The First Secretary of State and Cabinet Office minister said he “should have been clear” admitting that police contacted his lawyers on the matter in 2008 and called him personally in 2013.