The Tory MP was arrested and his Commons office raided in 2008 during an investigation headed by Quick

The decade-long feud between Damian Green and Bob Quick, now coming to a head with a Cabinet Office investigation into Green, can be traced back to a day in 2006 when a young civil servant working in Jacqui Smith’s Home Office was allegedly told by the now first secretary of state to get “as much dirt on the Labour party, the Labour government as possible”.

Christopher Galley had approached Green’s then boss, David Davis, who was the shadow home secretary, saying he was a committed Conservative and was willing to leak material.

Davis introduced Galley, who was then working in immigration, to Green, who was the Tory immigration spokesman. Galley, later on in a police interview, said he had wanted a “parliamentary job” with the Tories. Green repeatedly promised to “try to find something” but said “he wanted as much information as possible to damage them”, Galley said.

David Davis threatens to quit if Damian Green is sacked unfairly Read more

Over the course of the next two years Galley got a job in the home secretary’s private office and passed at least 31 separate documents, some classified restricted, from the heart of Smith’s department including from her private office’s inbox and private outer office safe.

On at least one occasion the leaked documents were clandestinely handed over in a London wine bar. “Do you know Balls Brothers opposite Victoria Station? If we say 6.15pm, and I will be in the back bar, which is quieter?” Green is alleged to have told Galley.

Green made maximum use of the documents to secure damaging headlines in the Daily Mail, Sunday Telegraph and other papers. The sustained and high-profile campaign went far beyond the normal trade in leaks between whistleblowing civil servants and opposition MPs – with claims that some of the leaks involved national security.

The Cabinet Office called in Scotland Yard to investigate. Quick, an assistant commissioner who as head of the SO15 unit covered politically sensitive specialist operations, was instructed to take on the job.

A Cabinet Office investigator pinpointed Galley as responsible for a handful of leaks but none of them involved secret material. The Crown Prosecution Service, with Keir Starmer in charge as director of public prosecutions, advised SO15 that a prosecution under the Official Secrets Act was not possible but Galley might have committed a crime of misconduct in public office.

Who's who in the Damian Green inquiry Read more

The Met investigation, which for a short period was run by Cressida Dick in Quick’s absence, pressed and arrested Galley and a warrant was obtained to search his home while the Home Office authorised a search of his work desk. They arrested Green at his home on 27 November 2008 for “aiding, abetting, counselling or procuring misconduct in public office” by Galley.

A judge granted Quick a search warrant for Green’s homes and constituency office and he pressed the House of Commons serjeant at arms for permission to search Green’s parliamentary office as well. The serjeant gave the police her consent and told the speaker, Michael Martin. A subsequent Commons privileges inquiry concluded that Martin assumed the police must have had a warrant but none had been presented. Quick claims he consulted the deputy Met commissioner Sir Paul Stephenson before the Commons raid.

Quick’s arrest of Green and raid on his Commons office prompted a massive political storm over whether the police had wildly overstepped the mark. Green’s lawyers argued that the material seized in the search, including that discovered on his computers, was covered by parliamentary privilege. Galley admitted leaking six documents about immigration, counter-terrorism legislation and crime rates and he was dismissed from the Home Office for gross misconduct.

The police submitted the case papers to the DPP but Starmer decided the evidence did not meet the threshold for a criminal charge.

But that was not the end of the matter. Back at Scotland Yard a “dysfunctional leadership team” saw a blame game develop between Stephenson and Quick, with a future head of counter-terrorism, John Yates, insisting the investigation had been doomed.

On the day after the arrest, Stephenson, on his first day in office as acting Met commissioner, taking over from Sir Ian Blair, drafted his own resignation while the parliamentary inquiries began.

But then events took an even more astonishing turn. Three weeks later Quick, in a move he later regretted, publicly accused the Tories “and their press friends” of “acting in a wholly corrupt way” to try to undermine his investigation into Green.

What had provoked his anger was a Mail on Sunday article detailing a wedding chauffeur business run by his wife, Judith, from the family home. The cars, which were pictured and included a 1973 Jensen Interceptor owned by Quick himself, were said to be hired out at £500 a day and driven by former police officers.

Quick immediately assumed the Conservatives, who had been calling his Green investigation “Stalinesque”, had planted the story. The Tories insisted they had nothing to do with the story and Quick retracted the “corruption” claim. He made an “unreserved apology”.

When only four months later in April 2009 he was photographed outside Downing Street holding a document that clearly revealed details of a potential counter-terrorism operation, he had run out of road. Smith as home secretary withdrew her support and he said his position was “untenable”.

The affair lay dormant for years. But last month, after Green was accused of making inappropriate advances on a female journalist, the Sunday Times published allegations that “extreme pornography” had been found on his parliamentary computer in 2008, basing the claim on a statement by Quick. Green claimed he was the victim of “unscrupulous character assassination” and said the claims amounted to “false, disreputable political smears from a discredited police officer acting in flagrant breach of his duty to keep the details of police investigations confidential”.

The corroboration of the pornography claim by a second police officer increases the pressure on Theresa May to act. However, May’s own long-term friendship with Green – she went to Oxford with his wife, Alice – and the steadfast support of Davis, who got him involved in the first place, may yet help secure his future.