Image copyright PA

Forty years ago this month police descended on Ceredigion and Powys, as part of what remains one of the world's biggest ever counter-drug operations.

Operation Julie involved more than 800 officers from 10 forces, and smashed two LSD production and distribution networks thought to have been supplying up to 90% of the UK's market in the drug.

In a mission which, at times, took on a comic element, specially trained officers spent most of 1976 undercover in the Welsh countryside, disguised as hippies.

In order to divert suspicion they staged fights with local police, who were largely unaware of the "hippies'" true identity.

On one occasion they were left listening to Radio Cymru for an entire day, when sheep gnawed through the bugging devices they had planted in the Tregaron home of ringleader Richard Kemp.

Down the road in Llanddewi Brefi, another group of male officers garnered unwelcome attention when they were suspected of being a "gay cult".

This necessitated the introduction of female officers, including Sgt Julie Taylor, after whom the operation would eventually take its name, and who was immortalised in The Clash's song Julie's Been Working for the Drug Squad.

Image copyright Raymond Daniel Image caption The operation was named after Sgt Julie Taylor

But despite these more light-hearted elements, when police finally swooped in March 1977, they seized 6.5 million LSD "tabs", along with share certificates and Swiss bank accounts valued in the millions.

Lyn Ebenezer, author of Operation Julie: The World's Greatest LSD Bust, was working as a freelance journalist in the area at the time.

He believes it is this juxtaposition between comic and gravity which has caused Operation Julie to live on in the memory through numerous books, films and TV and radio dramas.

"Cardiganshire was at the time the counter-culture capital," he said.

"The likes of the Rolling Stones, John Lennon and Jimi Hendrix had all made pilgrimages to the area, so perhaps it's no surprise that it became the centre of LSD production.

"But we didn't have a clue what was going on with these strange groups who'd moved in.

"To be honest, if anyone seemed more likely to be drug dealers then it was the police acting as hippies, as the actual dealers were all educated professional people who stood their round and blended in really well into the community.

"The dealers and the police would all be drinking in the pub together, getting up to all sorts of daft capers, so when the raids finally came we all had one hell of a shock."

Police were first alerted to the possible existence of the drugs network in 1975, when a Range Rover belonging to Liverpool University chemist Richard Kemp was involved in a fatal crash near Machynlleth.

A search of the vehicle found shreds of a wrapper, which when reconstructed, spelt the words "hydrazine hydrate", a key ingredient in the manufacture of LSD.

Kemp had been recruited in 1969 by Cambridge author David Solomon to manufacture the drug, initially at least, as part of a social experiment to bring world peace through "mind-expansion".

Unable to effectively distribute the LSD they had made, they turned to Henry Todd to handle sales, but by 1973 the group had fallen out, and Kemp and Solomon moved production from Cambridge to West Wales, creating two distinct LSD networks.

Julie's "hippies" put Kemp's Tregaron home under Surveillance, and noted his regular 50 mile commutes to Plas Llysyn, an old mansion in Carno near Llanidloes.

Image caption Plas Llysyn, in Carno, became a centre for the production of LSD tabs

Another group of "hippies" monitored the mansion from an old caravan, and when they secretly broke in, water samples taken from the cellar chemically matched LSD samples the police had previously seized.

Raids on 87 addresses in Wales, London, Cambridge and France between March and December 1977 would eventually turn up laboratory equipment, over £1m in cash and shares, and enough LSD for 6.5 million doses.

A total of 120 arrests were made, resulting in 15 convictions and prison sentences totalling 120 years.

As a result the price of an LSD "tab" rose overnight from £1 to £5.

Nevertheless, Mr Ebenezer does not necessarily believe Operation Julie was entirely the success it has often been portrayed as.

Image copyright Raymond Daniel Image caption Dyfed Powys detectives who participated in Operation Julie, following the trial at Bristol Crown Court

"I wrote my book because I think previous works have made out that Operation Julie was some major breakthrough in the war against drugs, but in actual fact it did do some harm," he said.

"The reason Kemp and Solomon split from the Cambridge gang was because Kemp wanted to produce more pure, safer LSD, and after he was caught the drug became much more dangerous as the people who came after weren't as choosy over what they cut it with.

"Kemp, his girlfriend Christine Bott, and several of the others were welcomed back into west Wales life after their prison sentences, whereas the dealers who came after them were a much nastier breed. So I'm not sure how much of a success you can really call it."

However, operation Julie does remain the blue print for cross-force drug operations and ushered in a new era of policing.

In 2010 Welsh actor Matthew Rhys bought the rights to Mr Ebenezer's book, although production on a film is yet to start.