AUGUSTA, Maine — Daniel Andrews blacked out two years ago during a violent episode brought on by post-traumatic stress disorder. When the Iraq war veteran “woke up,” he was in the Kennebec County Jail charged with aggravated assault.

Andrews, 28, of Waterville is expected to graduate this fall from the state’s only court designed especially for veterans. He is one of the first people to go through the program, which is part of the Co-occurring Disorders Court in Kennebec County.

The Army veteran served from 2004 to 2007 and was deployed to Iraq from 2005 to 2006, he said Monday after appearing before Superior Court Justice Nancy Mills. He credited the court with helping him get the assistance he needed to get his life on track again.

“Before I was arrested, I was not receiving any therapy or medications for my PTSD,” Andrews said. “I had isolated myself in my own house. I was unable to work and had no disability benefits. I got divorced, lost custody of my kids and was homeless for a period of time. I lost everything really.”

The veteran said that after two months in the county jail, he went to a locked psychiatric ward at Togus for several months before going to a veterans hospital in Massachusetts, which has a PTSD unit, for four or five months.

“I spent all that time getting help, getting therapy and getting on the right combination of medicines,” Andrews said.

Today, he receives disability benefits from the VA, is enrolled at the University of Maine at Augusta in a computer information program and is in the process of regaining custody of his children. Andrews is continuing his therapy, works with a peer mentor and appears in court once every two weeks.

“The court made things come together more easily than I could have made happen on my own,” he said. “Before therapy, I knew there were services available but trying to access them seemed more difficult than they’d be worth because of the PTSD.”

The court program designed for veterans who are involved in the criminal justice system was started quietly last year before the Legislature passed and the governor in March signed a law that allows the judiciary to create a Veterans Treatment Court program. The Legislature, however, provided no funding for the court. But because the law was passed, Maine will be able to apply for federal funds this fall to begin implementing a formal program.

The first Veterans Treatment Court was launched in January 2008 by New York state Judge Robert Russell in Buffalo, according to the website Justice for Vets, a nonprofit, nonpartisan organization committed to ensuring that veterans suffering from mental health illness and/or substance abuse who are involved in the criminal justice system have access to a Veterans Treatment Court. The website does not list Maine as having such a court, but notes there are nearly 100 across the nation.

“I think there’s a very strong feeling in Kennebec County and in Maine that the last thing we need to do for these people who served their country is for them not to be able to deal with their problems and, then, find selves incarcerated,” Mills said last week in a telephone interview.

Mills helped start the Co-occurring Disorder Court in 2005. The term “co-occurring disorder” is used by mental health providers to describe a person who has both an alcohol or drug problem and a psychiatric problem. To recover fully, the person needs treatment for both problems.

Similar to the adult drug courts operating around the state, the mental health court offers offenders an alternative to incarceration. Instead of sentencing a defendant to jail or prison time, the judge sentences an offender to the court’s supervision. In turn, the defendant agrees to undergo a rigorous treatment schedule and appear once a week or less before the judge.

Technically, veterans are part of the Co-occurring Disorders Court but they meet separately with Mills and have individual mentors who are veterans. Anne Archibald, veterans justice outreach specialist at the Maine Veterans Affairs Medical Center in Togus, also is part of the veterans court team along with a county prosecutor, defense attorney and case manager.

Having seen combat is not a qualification for being admitted to the veterans court program, Mills said.

“People who seem to have done well in society, who had no substance abuse problems or serious criminal record before their military service, are the veterans we are seeking to treat with this program,” she said.

Participants don’t have to live in Kennebec County but practically it is difficult for veterans who live more than 50 miles from Augusta to participate since they must appear in that city for court and because so many of the services for which veterans are eligible are located at Togus.

The startup court in Augusta is part of a growing national trend. Since 2009, the Bureau of Justice Assistance within the U.S. Department of Justice has recognized an increase in veterans becoming involved in the criminal justice system with co-occurring substance abuse and mental health problems, according to information on the bureau’s website. It has worked on developing a training curriculum for Veterans Treatment Court programs.

There now are five veterans in the Kennebec County program but it could accommodate 30 to 35 people without additional resources, according to Mills.

One of the things that has been helpful for incarcerated veterans, the judge said, was Kennebec County Sheriff Randall Liberty’s decision to house them in a separate section of the jail.

Liberty was unavailable to comment Tuesday.

Lt. Ryan Reardon said Tuesday that there were seven veterans in the jail but room for 14 in the cell block set aside for them. He said the decision to create a veterans block was based on best practices models developed in other parts of the country.

“We see little or no behavioral problems in veterans block,” Reardon said. “Having others around you who understand your problem makes a huge difference in behavior issues. [Veterans] have a unique understanding of each other from their experiences in the military so there’s a camaraderie that’s already there.”

Gregory J. Lumbert, 29, of Augusta is an inmate in the veterans block and a defendant in the veterans court. The former Marine is serving a six-month sentence at the jail.

“Being in the block gives you a sense of brotherhood, since we all have something in common,” Lumbert said Monday after appearing before Mills. “Because we were all trained to be obedient to orders and to be respectful, we are more respectful to each other and the guards than prisoners in the general population probably are.”

Lumbert said the court helps give former soldiers structure by making them meet once a week with the court, with mental health providers, substance abuse counselors, peer mentors as well as attend AA and/or NA meetings and complete tasks such as filling out applications for college.

“Veterans are used to a lot of structure in the military and when we are taken out of the structure, we feel lost,” he said.

Lumbert went into the veterans court program after he was charged with operating after revocation and drug violations, he said. He was facing two years in prison.

He said that at the jail he is receiving help for his mental health problems, which are part of what led to his arrest.

How many veterans like Andrews and Lumbert are incarcerated in Maine’s prisons and jails is not known, according to Archibald, the justice outreach specialist at Togus. She said she is working with the Department of Corrections and the county jail system “to get a handle on” the number of incarcerated veterans in the state.

Each VA medical center now has a facility-based veterans justice outreach specialist like Archibald who is responsible for direct outreach, assessment and case management for justice-involved veterans in local courts and jails, and liaison with local justice system partners, according to information on the Veterans Affairs website.

Archibald has been on the job for 13 months. Between Oct. 1, 2011, and March 31, 2012, she had contact with 55 veterans involved with the criminal justice system in Maine. She said Tuesday that her current caseload is 20, but she also is serving on several task forces set up to provide better services to veterans suffering from mental health and/or substance abuse problems in Maine’s criminal justice system.

A 2004 study by the U.S. Bureau of Justice, the most recent figures available, found that 72,000 veterans were housed in local jails, 136,800 were in state prisons and 19,300 were incarcerated in federal prisons.