The future Tory leader - who until now has refused to say if he took drugs - was caught after another pupil informed on him. Cameron, who at the time was just 15, was hauled in by the headmaster, who forced him to admit he had smoked cannabis.

The furious master punished him by putting him under the top public school's equivalent of house arrest by being 'gated'.

But this did not stop Cameron's drug- taking, according to a book to be serialised exclusively in The Mail on Sunday next month. It says he carried on smoking cannabis when he went to Oxford.

The disclosures in the book - Cameron, The Rise Of The New Conservative - are bound to reopen the debate about drugs policies in Britain.

If he wins the next General Election, Mr Cameron will be the first Prime Minister to have admitted taking drugs.

Mr Cameron repeatedly refused to answer questions during his successful Tory leadership campaign 18 months ago on whether or not he had taken drugs. Westminster was rife with rumours that he had smoked cannabis and there were claims that he had experimented with cocaine.

Mr Cameron insisted he had a right to stay quiet on the issue in spite of making a series of provocative calls to liberalise drugs laws.

He hinted he had taken drugs by saying he had had a 'normal' university life, but insisted his right to privacy meant there was no need to give more details.

The dramatic development will be seized on by Labour's heir apparent Gordon Brown, who has issued a clear public statement that he has never taken drugs.

It will also provide ammunition for a hard core of Right-wing Tory enemies who will see Mr Cameron's youthful flirtation with drugs as further proof that he is too liberal, politically and personally, to be a successful Conservative leader.

In a bizarre twist, one of the pupils who was expelled in the drugs scandal, Josh Astor, is related by marriage to Mr Cameron's wife, Samantha - and has links with Mr Cameron himself.

Astor is the adopted son of ex-Tory MP Michael Astor, the uncle of Samantha's stepfather Lord Astor, one of Cameron's front-bench spokesmen.

Long after the Eton scandal, Astor went on to be imprisoned for a drugs offence. He currently has two homes, one a few streets away from the Camerons' West London home in Notting Hill and a second in Chipping Norton in Mr Cameron's Witney constituency in Oxfordshire.

The new book, to be published by Harper Collins on April 2, describes how Mr Cameron came within a whisker of being thrown out of Eton in a drugs scandal in 1982.

A number of pupils were found to be both using and distributing cannabis, it says. Normally, such incidents were dealt with internally by the school to avoid damaging publicity. But this was far too serious.

Headmaster Eric Anderson, who ten years earlier had taught Tony Blair at Fettes, Scotland's equivalent of Eton, called in the police. The scandal was reported by several national newspapers, though Cameron was never named.

The book says: "The police oversaw an investigation by the school apparently determined, at least at first, to root out all drug users. The initial culprits were called upon to reveal to whom they had sold drugs, an offence that ensured automatic expulsion. On the first day, seven were summarily thrown out and the investigation began to snowball."

Pupils were in a state of panic as drugs-squad police searched their rooms and hauled two suspects to the police station to be interviewed. It was reported that pupils had obtained the drugs from a dealer in Notting Hill, ironically where Mr Cameron lives today, though in those days it was far less trendy.

Parties of up to ten boys would gather in a room to listen to Bob Marley reggae records and smoke cannabis, said Press reports at the time. Cameron was a big fan of reggae band UB40, but there is no evidence he was at the Bob Marley dope parties.

One of the pupils who was forced to leave said: "A couple of guys were going to Slough to buy the stuff. We were heavily leaned on to give names. There were a lot of people involved. They tried to accuse me of dealing in it. I told the headmaster, "If you kick me out, you'll have to kick an awful lot of people out"."

Staff used a 'nice teacher, nasty teacher' questioning technique to try to force pupils to inform on each other.

"They realised the numbers were much greater than they thought,' said one former pupil. "They couldn't rusticate (temporarily expel) everybody."

Cameron's house, JF, (named after housemaster John Faulkner) was at the centre of the scandal.

"It was on the edge of Eton with views out over the countryside and towards the railway arches, and both domains offered handy cover for illicit smoking and drinking,' write authors Francis Elliott and James Hanning.

"From the house, it was possible on occasion to witness the surreal scene of groups of two or three teenagers in tailcoats trudging back towards the school, their purported interest in the botany of east Berkshire temporarily sated.

"Cameron's house was just over the road from the Arts School, and the drugs purge took a disproportionate toll on those who attended it."

Another Old Etonian expelled in the crackdown said: "It was a group of pretty naughty characters and they tended to get into trouble."

He said the drugs clean-up was 'like a military operation' and rumours about which pupils informed on others still caused resentment. Cameron had kept his head down - until one of his fellow pupils named him as being one of the drug-takers. He was summoned before headmaster Mr Anderson who asked him point blank: Had he smoked cannabis? Cameron made a full confession, but unlike the ring leaders, avoided expulsion.

"Because he had only smoked and not sold the drugs he was not thrown out. Instead he was fined, gated (refused all leave) and given a Georgic (copying hundreds of lines of Latin)."

Mr Anderson, who refuses to talk about Cameron's drug-taking, told the authors: "We would have said, "Let's get the ring leaders" and if there were others involved, we would have scared them off from doing it again."

In all, seven boys were expelled, including Josh Astor, two more were told to leave at the end of term, five were suspended and four more were 'gated'. Cameron was in the group who were 'gated'.

The book claims Cameron's drugs shame at Eton was the reason he refused to talk about his experience of drugs when he stood as Tory leader in 2005.

"Fearing his offence would resurface, he chose not to answer any questions about his drugs use. It was a decision that has brought enduring innuendo about alleged cocaine use, but one that has ensured that while he may have inhaled cannabis, no "drugs lies" have left his lips,' says the book.

If the scandal had emerged then, Mr Cameron's Tory foes, who rightly suspected his silence was to mask the fact that he had taken drugs, would have used it to try to destroy his campaign.

Surprisingly, his headmaster's stern lecture on the perils of drug taking did not change Cameron's behaviour. The book refers to his 'infrequent and moderate consumption of cannabis during his three years at Oxford', though it adds he often turned down the offer of drugs from other students.

A decade later, the Eton incident came back to haunt him when he had another uncomfortable meeting with his former headmaster. By now, Mr Cameron was special adviser to Home Secretary Michael Howard in John Major's government. He arrived for dinner at Mr Howard's grace and favour home in Belgravia to find that Mr Anderson was one of the guests.

Mr Cameron squirmed with embarrassment as Mr Anderson told how 'no boy of his year gave him more trouble' than Cameron. Mr Cameron held his breath, fearing Mr Anderson was about to tell Mr Howard, who took a notoriously hard line on drugs, how his adviser was nearly expelled from Eton for smoking cannabis. Luckily for Mr Cameron, the discreet Mr Anderson kept his dark secret.

It was not the only awkward moment for Mr Cameron in his time with Mr Howard at the Home Office. The book describes Mr Cameron's private doubts about Mr Howard's crackdown on 'rave parties' where drug-taking was rife. Mr Cameron was concerned 'not least because Samantha (then his girlfriend) was attending exactly the sort of dance events Howard wanted to ban'.

Mr Cameron came into contact with the world of drug-taking again when he became a spin doctor for Carlton Communications in 1997, where one of his jobs was to entertain media editors at TV industry gatherings. "Cocaine use is hardly unknown at these industry gatherings but Cameron's chosen refreshment was lager."

He panicked again in 2000 when he was adopted as Tory Parliamentary candidate for Witney. It came after half the Tory Shadow Cabinet caused a sensation by admitting they had taken drugs. Tory candidates were told to give honest answers and Mr Cameron was terrified that Witney Tories would ask him. Luckily for him, they did not.

Josh Astor features again in the book in another school expulsion scandal when he caused trouble for Jade Jagger, daughter of rock star Mick Jagger.

Jade was expelled from the expensive St Mary's private school for girls in Calne, Wiltshire, where her best friend was Clare Cameron, David Cameron's younger sister, after sneaking out of school to meet Astor.

And when Cameron invited Clare and Jade to Oxford, there was a hilarious misunderstanding after Jade told Jagger that Cameron had taken them 'punting' on the river.

"The following Monday, Cameron's mother Mary received a call at home. It was Mick Jagger, not pleased. "What's all this my daughter's been getting up to with your son?" he demanded. "You know I don't approve of bloodsports." Mary explained gently that his daughter had enjoyed an entirely peaceful afternoon punting on the river."

The book also refers to a third school drugs scandal involving Samantha Cameron's sister, Emily, who was expelled from Marlborough, where both girls were educated, after drugs were found in her dormitory.

And it details Samantha's friendship during her years at Bristol University with rap star Tricky (real name Adrian Thaws) and how they spent time at the Montpelier Club, which was renowned for drug-taking and violence, though Samantha avoided both.

But it is the book's impact on Mr Cameron's controversial political and personal stance on drugs that will provoke most interest. At various times since becoming an MP he endorsed a call for 'shooting galleries' for hard-core drug-users, explaining: "Anything that helps get users off the streets is worth considering." He said the UN should consider legalising drugs and state- prescribed heroin and said the legal classification of ecstasy should be downgraded.

His leadership campaign was dominated by repeated calls for him to clarify whether he had taken cannabis and cocaine before becoming an MP.

Mr Cameron said: "I'm allowed to have had a private life before politics in which we make mistakes and we do things that we should not and we are all human and we err and stray."

Asked directly whether he had taken Class A drugs, he said: "I have said all I want to say about this. I didn't spend the early years of my life thinking, "I better not do anything because one day I might be a politician" because I didn't know I was going to be a politician."

The closest he has come to admitting taking drugs was when he was asked if he had done so at college.

"I had a normal university experience,' he said. When the interviewer replied: "So that's a yes, then,' Mr Cameron added: "There were things that I did then that I don't think that I should talk about now that I'm a politician."

In a light-hearted anecdote, the book tells how media reports of Mr Cameron and drugs caused intense fascination in the bars and clubs of Notting Hill, which has become synonymous with his new wave of metropolitan Tories.

It says: "One West Londoner reprogrammed his mobile phone so that, when he receives a call from his cocaine dealer, he proudly shows his friends the caller ID. It reads "David Cameron"."