A former senior executive at the Government body that oversees youth justice has withdrawn from the race to become a Police and Crime Commissioner because he was once convicted of trespassing when he was 13.

Bob Ashford, formerly Director of Strategy at the Youth Justice Board, said the rules surrounding the elections were “flawed” and an “infringement of the rights of young people”.

But he said that he could not with conscience sign a declaration that he had no legal bar to standing in the knowledge that he had been convicted of a criminal offence that would disqualify him.

Mr Ashford, who was standing as the Labour PCC in Avon and Somerset, is the second candidate for the newly created posts overseeing police forces who has been force to step down because they had a criminal conviction when they were still a child.

Last month the Falklands war hero Simon Weston pulled out of standing for the PCC job in South Wales after questions were raised about his eligibility. The former Welsh guardsman, aged 50, had a criminal conviction when he was 14 for being a passenger in a stolen car which potentially would have disqualified him from standing.

Under the legislation, which the Home Office said had cross party support, a person is disqualified if they have at any time been convicted of an offence for which a person could be sent to prison whether or not they were sent to prison themselves.

In a statement Mr Ashford said he had barred himself from standing to illustrate the pressures and injustices that children and young people who get caught up in the criminal justice system can face.

“At the time I was 13 and living on a council estate in Bristol,” he said.

“I had no previous involvement with the police and came from a good and caring family.

“I remember very well the knock on the door from a group of lads I knew from school. They persuaded me to go out with them and I felt I had little choice. I knew that if I refused they could make my life difficult.

“We went to the railway embankment and one of the lads pulled out an air gun and started shooting at cans.

“I never touched the air gun but felt unable to leave. A goods train passed and presumably the guard reported our presence to the police who arrived a short time later. The lads with the air gun ran away whilst I and two others froze and were arrested.

“I went to court and was to the best of my knowledge charged with trespass on the railway and possession of an offensive weapon. I was told to plead guilty to the two charges even though I had never touched the air gun. I was fined £2 and 10 shillings on both counts. Both of these offences are to the best of my knowledge “imprisonable” offences.”

Mr Ashford added that the police had no record now of the offence and for his previous jobs he had been vetted by the Home Office and been given access to official secrets.

But he said he was not prepared to lie on his declaration form – which in itself would be a criminal offense.

“It is ironic that after a professional and political career spanning my entire life I am now going to be brought down by a piece of legislation which absolutely contradicts the tenets that every individual has worth and the ability to change their lives.”

In a statement the Home Office said: “The Police Reform and Social Responsibility Act 2011 disqualifies a person from standing for election as a PCC if they have at any time been convicted of an offence for which a person could be sent to prison; whether or not they themselves were sent to prison for that offence.