David Cameron got into serious trouble at Eton after admitting smoking cannabis, it was revealed last night.

The Conservative leader - who has repeatedly dismissed media inquiries by refusing to comment publicly on whether he has taken drugs - was also understood to have continued occasionally to smoke pot as a university student at Oxford.

While drug scandals have sometimes proven politically toxic in the past, Cameron's inner circle of advisers was hoping, however, that British voters would accept his argument that such 'errors' committed before he entered politics should be viewed as a thing of the past.

Encouragingly for the Conservatives, official spokesmen in Downing Street and at Labour party and Liberal Democrat headquarters all said last night that they had no immediate plans to comment on the revelations.

The initial incident, according to a top Tory official interviewed by the The Observer, occurred in 1982, when Cameron was 15 years old.

Eton launched an investigation into reports that some boys were buying drugs in the nearby town. During the course of the inquiry, Cameron and a number of other pupils admitted smoking pot, the party official revealed.

Several other boys were also found to be selling drugs and were asked to leave the school. But Cameron was 'gated'- meaning that he was deprived of school privileges and barred from leaving the premises or being visited by friends or family. His punishment lasted for about a week.

An Eton contemporary said the punishment had been particularly humiliating for the future Leader of the Opposition because it had come shortly before the annual 'Fourth of June' gala day, when the college is thrown open to pupils' parents, relatives and friends who are invited to enjoy exhibitions, speeches, sports events and the traditional 'Procession of Boats'.

'Cameron was gated just beforehand, so his parents, who had been looking forward to spending the day with him, had to apologise to their friends,' the student said. 'It was all painfully embarrassing. But after that he pulled himself together and became an exemplary pupil.'

Last night, a Tory spokesman said Cameron was standing by his refusal to be drawn publicly on any questions regarding past drug use - a position he adopted during his campaign for the party leadership in 2005.

'David felt, and still feels, that politicians are entitled to a past before they came into politics. David had a past, and he's not going to be talking about it,' the spokesman said. But a close friend said Cameron had privately acknowledged his drug use and seen the incident at Eton as a 'wake-up' call that had eventually spurred him to 'take life more seriously'.

The issue of whether Cameron used drugs was first raised in a public interview by The Observer's chief political commentator, Andrew Rawnsley, early in the party leadership race. It led to frantic media speculation over whether he might have used Class A drugs while at Oxford, and briefly threatened to derail his bid for the top job.

In the Rawnsley interview, during the Tory party conference, an apparently surprised Cameron was asked whether he had ever taken drugs in his younger days. He replied: 'I had a normal university experience.'

When Rawnsley continued to press him on the issue, Cameron added: 'There were things I did as a student that I don't think I should talk about now that I am a politician.'

While he was at Eton, Cameron later admitted, he had 'a few brushes with authority', but he did not go into detail.

He meanwhile also managed to gain 10 good grades at O-level - four grade As, five Bs and a C - as well as notching up A grades in his A-level history, economics and history of art exams.

One senior master was quoted as saying: 'He was a very well-behaved and decent boy. People here remember him as a nice, bright, pretty normal schoolboy.'