The number of former servicemen in prison or on probation or parole is now more than double the total British deployment in Afghanistan, according to a new survey. An estimated 20,000 veterans are in the criminal justice system, with 8,500 behind bars, almost one in 10 of the prison population.

The proportion of those in prison who are veterans has risen by more than 30% in the last five years.

The study by the probation officers' union Napo uncovers the hidden cost of recent conflicts. The snapshot survey of 90 probation case histories of convicted veterans shows a majority with chronic alcohol or drug problems, and nearly half suffering from post-traumatic stress disorder or depression as a result of their wartime experiences on active service.

Those involved had served in Northern Ireland, Bosnia, Iraq and Afghanistan. They are most likely to have been convicted of a violent offence, particularly domestic violence.

The study provides the strongest evidence yet of a direct link between the mental health of those returning from combat zones, chronic alcohol and drug abuse and domestic violence.

In many cases the symptoms of depression or stress did not become apparent for many years and included persistent flashbacks and nightmares.

Professor Tim Robbins, consultant clinical psychologist and former head of traumatic stress services at St George's hospital, London, said: "If we are asking people to do appalling things, to take part in regular firefights and hand-to-hand combat, you get to the stage where it de-sensitises them to violence. It is not just these specific things, but also [for soldiers] there is the constant rising and falling of the level of tension. In combat, they are constantly on edge and after a while they become constantly on edge."

Harry Fletcher, Napo's assistant general secretary, said the high numbers of former soldiers in prison was unacceptable: "There is overwhelming evidence that support is not available of sufficient calibre when soldiers leave the service. The preponderance of post-traumatic stress disorder and depression is also alarming."

Probation staff in 62 offices across England and Wales say the vast majority of former soldiers referred by the courts for criminal justice supervision did not receive adequate support or counselling on leaving the armed forces.

Napo also says their military experience and background is not being routinely identified when they are arrested or convicted in the courts. It wants a specific duty to be placed on criminal justice agencies to refer service personnel for appropriate help and counselling.

Probation officers say the military also urgently needs to provide programmes to tackle chronic alcohol abuse and domestic violence committed by those in their ranks and on discharge.

The probation union's estimate of 20,000 veterans in the criminal justice system breaks down into 12,000 veterans on probation or parole, and a further 8,500 in custody. These figures represent 8.5% of the total UK prison population, and 6% of all those on probation or parole.

The survey on those on probation and parole was carried out this summer and builds on a prison estimate made last year. The Ministry of Justice and the Ministry of Defence have so far taken more than a year to complete a basic survey of the number of veterans in prison. At one point the exercise was hindered by claims it contravened the Data Protection Act.

The shadow justice secretary, Dominic Grieve, said it was a disgrace that so many who served their country were in jail.

"No one is above the law, but this government has failed to provide proper support to our troops on return home," he said. "The public will be shocked to find so many soldiers in jail when the government has released thousands of criminals early because of lack of cells."

A Ministry of Justice spokesman insisted they took their duty of care for all offenders very seriously, irrespective of background. "Our first priority is protecting the public. By providing offenders with support and information which will aid their resettlement in the community we reduce the risk they will reoffend."

The spokesman said people entering the criminal justice system were from a range of backgrounds. A variety of issues had contributed to their offending behaviour, which staff worked to address.

The Ministry of Defence acknowledged that a "small minority" of ex-service personnel can face serious difficulties. A spokesperson said: "We provide a wide range of support, before, during and after leaving the services, including the MoD's Prison-in-Reach initiative," which aims to raise awareness among ex-service offenders and their families about the help available to them.