ES News email The latest headlines in your inbox twice a day Monday - Friday plus breaking news updates Enter your email address Continue Please enter an email address Email address is invalid Fill out this field Email address is invalid You already have an account. Please log in Register with your social account or click here to log in I would like to receive lunchtime headlines Monday - Friday plus breaking news alerts, by email Update newsletter preferences

David Davis made clear he was ready to quit the Cabinet if Damian Green was unfairly fired over allegations of porn and inappropriate behaviour, it was revealed today.

Sources said the Brexit Secretary had “put his cloak around” the embattled Mr Green in an effort to toughen Theresa May’s resolve to defend her deputy.

The disclosure came as a retired Scotland Yard detective alleged that “thousands” of pornographic images were found on Mr Green’s computer in 2008.

A mutual friend of Mr Davis and Mr Green said: “David would find it quite difficult to stay in his job and not resign if Damian was pushed out because of anything related to what happened 10 years ago.”

The friend said the warning had been passed to the Prime Minister “in words of one syllable”, adding: “David has been absolutely fabulous to Damian in what are quite trying circumstances. He has put his cloak around him to that extent.”

A source close to Mr Davis said: "It’s right that allegations of misconduct towards individuals are properly investigated, but police officers have a duty of confidentiality which should be upheld."

The new claims about pornography came from Neil Lewis, who was a Met expert in analysing computers, attached to counter-terrorism investigations. He was part of the team that raided Mr Green’s Commons office in 2008.

At the time, Mr Green was a member of Mr Davis’s shadow home affairs team. The raid was mounted to catch a Whitehall official leaking secrets to Mr Green but officers made the chance discovery that the MP’s parliamentary computer appeared to have been used to view pornography.

Lord Carlile, the former watchdog over anti-terror laws, called on Met chief Cressida Dick to exert her “authority” and take control of the Met’s handling of the controversy.

He told the Evening Standard it was “unacceptable” for former officers to dredge up old evidence to embarrass people.

Mr Green was a member of Mr Davis’s shadow home affairs team when police raided his office in an attempt to identify a Whitehall leaker.

The source close to Mr Davis said: “He was very angry about the way the police are behaving on this. It is true to say he has raised it with senior people including the Prime Minister.” The source said he did not think Mr Davis had threatened Mrs May directly that he could resign.

Lord Carlile, a former independent reviewer of terrorism legislation, called on Met chief Cressida Dick to exert her “authority” and take control of the force’s handling of the controversy.

He told the Standard it was “unacceptable” for former officers to dredge up old evidence to embarrass people.

In an interview with the BBC, Mr Lewis said he was “shocked” at the volume of pornographic images and had “no doubt whatsoever” in his mind that these were accessed by Mr Green.

His study of the machine suggested someone spent “hours” browsing porn at Mr Green’s desk in the Commons over many weeks.

He said the images were legal and not violent or extreme. “The computer was in Mr Green’s office, on his desk, logged in, his account, his name,” said Mr Lewis.

“In between browsing pornography, he was sending emails from his account, his personal account, reading documents ... it was ridiculous to suggest anybody else could have done it.” Similar material had also been accessed on Mr Green’s laptop, he claimed.

Experts in civil liberties were shocked by an apparent admission by Mr Lewis that data copied from Mr Green’s computer was not permanently deleted and could have been recovered if needed. Lord Carlile, a former Lib Dem MP, said there appeared to be “a complete loss of authority” at Scotland Yard.

“I would expect the Metropolitan Police Commissioner to take charge given that we are dealing with the effective deputy prime minister,” he said.

“I think the whole conduct of the police in this case is quite extraordinary.” Two senior Tory ex-ministers also criticised the leaks.

Tim Loughton, who sits on the Commons home affairs committee, said: “This whole matter stinks. The Met urgently need to investigate this leak.”

Andrew Mitchell, the former chief whip, told the BBC: “The police need to explain why there was any record kept of entirely legal activity.”

A Labour legal figure added: “The police can’t just seize your computer for one reason and then blacken your name with what they found on it later, where no charges are brought.”

The claims follow similar allegations made by Bob Quick, an ex-Met assistant commissioner. Mr Lewis said he decided to go public after talking to Mr Quick.

Mr Green, 61, the MP for Ashford in Kent, is now First Secretary of State. He is already the subject of a Cabinet Office inquiry into alleged inappropriate behaviour towards writer Kate Maltby.

His spokesman said: “It would be inappropriate for Mr Green to comment on these allegations while the Cabinet Office investigation is ongoing.

However, from the outset he has been very clear that he never watched or downloaded pornography on the computers seized from his office.

He maintains his innocence of these charges and awaits the outcome of the investigation.”

The Met said: “Confidential information gathered during a police inquiry should not be made public. The correct course of action is to co-operate privately with the Cabinet Office inquiry as the Metropolitan Police has done.

"The circumstances of information being made public will be looked by the Directorate of Professional Standards.”