Wiltshire Police's investigation into claims Sir Edward Heathwas a paedophile has courted controversy ever since it was first launched publicly outside the former prime minister's home.

When Superintendent Sean Memory used a television appeal in August 2015 to urge potential victims of Sir Edward to come forward, friends of the former prime minister dismissed the child sex abuse allegations as "totally uncharacteristic and unlikely".

Former colleagues also rallied to defend his reputation and criticised the way the investigation was being handled.

What began as a corruption probe over claims the prosecution of a brothel owner was dropped after threats were made to expose Sir Edward morphed into Operation Conifer, with Wiltshire Police leading at least seven forces carrying out inquiries into the former prime minister.

Investigations later revealed there was no evidence to support the corruption claims involving madam Myra Ling-Ling Forde.

In November last year a whistleblower, who was enlisted by detectives to examine the Operation Conifer evidence, said she had "exposed a catalogue of fabrication" at the heart of the probe.

Dr Rachel Hoskins, a criminologist, also branded the inquiry "a disgrace" and said that, while the force had accepted her report, she had "little confidence" police would pass the findings on to MPs.

The following month, the chief constable of Wiltshire Police, Mike Veale, wrote a public letter to "set the record straight" about the £1.5 million investigation, saying it was "complex and multi-stranded" and was "not a fishing trip or witch hunt".

Lord Macdonald, the former director of public prosecutions, accused Mr Veale of presiding over a "tragi-comedy of incompetence" and called for a judge-led inquiry into how Sir Edward's name was "so shockingly traduced".

But some politicians have backed Mr Veale, including current Salisbury MP John Glen, who described him as a "dedicated and principled police officer", who did "the right thing and decided that every allegation of such a serious crime must be judged on its own merits, however unpleasant and controversial."

Operation Conifer was not the only high-profile police inquiry of recent times - set up in the wake of the Jimmy Savile scandal - to attract fierce criticism.

Sir Bernard Hogan-Howe, the then Met commissioner, faced calls to quit after Operation Midland - launched by Scotland Yard to investigate claims of a VIP paedophile ring and murder allegations - closed in March last year without a single arrest being made.

The investigation centred on the claims of one individual, known only as "Nick", and related to a 10-year period in the 1970s and 1980s.

Former Conservative MP Harvey Proctor, who was questioned as part of Operation Midland, revealed Sir Edward and ex-home secretary Leon Brittan had been named among his "alleged co-conspirators".

Sir Edward was the most high-profile political figure to be linked to child sex abuse allegations that swept across Westminster.

A raft of politicians from across the political spectrum has been accused of abusing children, including Mr Proctor, Liberal Democrat Sir Cyril Smith and Labour peer and former MP Lord Janner.

It is thought Wiltshire detectives believe they have avoided the errors made by earlier high-profile investigations by not relying on a single source.

Operation Conifer may now have ended, but questions about its handling and wider issues surrounding the way police approach cases involving historical allegations will rumble on.