That idea has met with considerable resistance from prosecutors and judges leery of creating any class of offenders with distinct privileges. In Mr. Gregg’s case, for instance, Judge Kornmann cautioned the jury that nobody got “a free pass to shoot somebody” because they “went to Iraq or Afghanistan or the moon.”  Still, more and more, with the troops’ mental health a rising concern, these defendants are succeeding in at least raising the issue of psychological war injuries. Aggressive defense lawyers, many in the military bar, are insisting that Iraq or Afghanistan be factored into the calculus of justice in these cases. They are arguing that war be seen as the backdrop for these crimes, most of which are committed by individuals without criminal records.  “I think they should always receive some kind of consideration for the fact that their mind has been broken by war,” said Lt. Col. Colby Vokey, Western regional defense counsel for the Marines.  Last year, California became the first state to pass legislation dealing with the small fraction of Iraq and Afghanistan veterans who end up entangled with the law. Updating a Vietnam-era statute, Gov. Arnold Schwarzenegger quietly signed a bill that permitted judges to divert troubled veterans into treatment programs.  “This is going to be on my tombstone, this bill,” said Pete Conaty, a Vietnam veteran who lobbied for it. “It has been a personal crusade of mine to make sure we don’t make the same mistake with Iraqi vets as we did with my generation.”  But the California law applies only to lesser crimes, as, in all likelihood, will any bills that it inspires, like one being debated in Minnesota.  Iraq and Afghanistan veterans facing homicide charges must defend themselves without the benefit of such laws. And in so doing, they often provoke intense moral and legal wrangling, turning local courthouses into unlikely forums for debate on the effects of the war.  Generally that debate takes place behind closed doors during plea negotiations. In cases that go to trial, however, the scene can be surreal, with Iraq commanding center stage as testimony about fingerprints and blood spatter alternates with questioning about mortar attacks in Baquba and civilian casualties in Baghdad.  Service members, sometimes wearing dress uniforms and spit-shined shoes, introduce their psychiatric evaluations into evidence and put their military colleagues on the stand to argue that the crime in question was completely out of character.  Tim Long, for instance, a company first sergeant with the South Dakota National Guard, testified about Mr. Gregg, whom he had nominated for a Bronze Star. “He’s a young farm boy, you know?” he said. “Competent young man. My friend.”  Born during the Vietnam War era, the combat version of what became known as the PTSD defense is being dusted off for a new generation of war veterans.  “I’m seeing it all the time now,” said David P. Sheldon, a civilian lawyer in Washington who represents military personnel. “And I will not be surprised to see this resonate as a consistent theme over the next few decades when people will be committing crimes after suffering repeated traumas in Iraq.”  It was in 1980, five years after the Vietnam War ended, that the psychiatric establishment first recognized post-traumatic stress disorder. Vietnam veterans quickly summoned it as a primary legal defense. In many cases, the veterans argued that they had been rendered temporarily insane as a result of flashbacks to the war while committing their crimes.  One of the first murder defendants to do so successfully was Charles G. Heads, who was found not guilty by reason of insanity for killing his brother-in-law a decade after he left Vietnam. Medical experts contended that Mr. Heads believed he was “cleaning out a hooch,” or hut, in Vietnam when he kicked in a door and shot his victim.  As time went on, the PTSD defense met increasing resistance just as the use of the insanity defense was limited by many states.  Taking a more cautious approach, the current generation of war-era defendants is most often using combat trauma not to escape culpability but to explain state of mind.  Were it not for their deployment to Iraq, they argue, they probably never would have committed the crime. Before Iraq, they claim, they were not paranoid, aggressive, jumpy or suicidal; they did not carry around loaded weapons, drink to excess, misread threats or explode in anger.  “In many of these cases, you have a nasty mix: a gun, intoxication and someone inaccurately assessing their environment and the consequences of their behavior,” said Thomas Grieger, a recently retired Navy forensic psychiatrist.  In general, the veterans raise their combat trauma during plea negotiations or in the sentencing phase of trials, hoping for reduced charges or a lesser sentence.  Anthony J. Klecker, a former marine, pleaded guilty to criminal vehicular homicide for a drunken crash that killed a high school cheerleader, Deanna Casey, in Minnesota in 2006. But his lawyer argued that Mr. Klecker, 29, who had already spent a year in jail, should be sentenced to six months of inpatient treatment instead of the 48 months in prison called for by sentencing guidelines.  “Tony would never, ever claim his war experiences, associated psychological injuries and alcoholism should excuse him from responsibility for Ms. Casey’s death,” his lawyer, Brockton D. Hunter, wrote the judge. But, he said, Mr. Klecker was a “psychological casualty of the war in Iraq who unsuccessfully sought treatment from an overstrained Veterans Administration.”  The state judge agreed to impose the alternative sentence, and Mr. Klecker was admitted to a dual program for substance abuse and PTSD at the Veterans Affairs hospital in St. Cloud, Minn.  But then things got complicated. After getting into a verbal fight with another veteran, Mr. Klecker lost his residency privileges. He was returned to jail; the prosecutor is seeking once more to send him to prison.  ‘A Tale of Two Places’  “This is really a tale of two places,” James Gregg’s lawyer said during his opening statement in 2005 in the federal courthouse in Pierre, S.D.: the Crow Creek Indian Reservation where the killing took place and “a very, very faraway” place, “a place called Iraq.”  By framing the case this way from the start, the lawyer, Timothy J. Rensch, made it clear that Mr. Gregg’s explanation for the “murder in Indian country,” as the charge read, would be inextricably bound to his year as a National Guardsman in Iraq.  That approach rankled the prosecutor, who referred to it as “waving the flag,” although Mr. Rensch stated that he was not trying to use Iraq “as an excuse” since Mr. Gregg was arguing self-defense.  “But you need to understand about Iraq and what happened to Jim over there for you to be able to see things from his point of view, and understand his thinking, and especially understand, really, his desperation at the end,” Mr. Rensch said.  On the evening of July 3, 2004, Mr. Gregg, then 22, spent the night with friends in a roving pre-Independence Day celebration on the reservation where he grew up, part of a small non-Indian population. They drank at a Quonset hut bar called the Pit Stop, in a trailer community and finally at a mint farm where they built a bonfire, roasted marshmallows and made s’mores.  According to the prosecutor, Mr. Gregg got upset because a young woman accompanying him gravitated to another man. This, the prosecutor said, led to Mr. Gregg spinning the wheels of his truck and spraying gravel on a car belonging to James Fallis, 26, a former high school football lineman who grew up performing American Indian dances on what is called the powwow circuit.  Some time later, a confrontation ensued. Mr. Gregg was severely beaten by Mr. Fallis and, primarily, by another man, suffering facial fractures. Later that night, with one eye swollen shut and a fat lip, he drove to Mr. Fallis’s neighborhood.  Mr. Fallis emerged from a trailer, removed his jacket, asked Mr. Gregg if he had come back for more and opened the door to Mr. Gregg’s pickup truck. Mr. Gregg then reached for the pistol that he carried with him after his return from Iraq. He pointed it at Mr. Fallis and warned him to back away.  Mr. Fallis moved toward the trunk of his car, and Mr. Gregg testified that he believed Mr. Fallis was going to get a weapon. He started shooting to stop him, he said, and then Mr. Fallis veered toward his house. Mr. Gregg fired nine times, and struck Mr. Fallis with five bullets.  Mr. Gregg drove quickly away, ending up in a pasture near his parents’ house. From there, he spoke on the phone to his best friend, Jacob Big Eagle, who told him that Mr. Fallis was dead.  According to Mr. Gregg’s testimony, he then put a magazine of more bullets in his gun, chambered a round and pointed it at his chest.  “Jim, why were you going to kill yourself?” his lawyer asked in court, seeking to rebut the prosecutor’s contention that guilt had driven him to suicidal despair.  “Because it felt like Iraq had come back,” Mr. Gregg said. “I felt hopeless. All that happened, no one would believe me. That I didn’t want this to happen. I never wanted to shoot him. Never wanted to hurt him. Never. Everything happened just so fast. I mean, it was almost instinct that I had to protect myself.”  The atmosphere in the courtroom was tense throughout the trial, with American Indians on one side of the aisle and white ranchers on the other. Complicating matters, the participants in Mr. Gregg’s case traveled, in a sense, back and forth between the bluffs of the Missouri River and those of the Tigris as they grappled with the relevancy of his military experience.  Mr. Gregg joined the National Guard at 18. He was studying at a technical school, with the goal of becoming a diesel mechanic, when his combat engineering company, whose expertise resided in bridge building, was shipped to Iraq in the spring of 2003.  “He left for Iraq enthusiastic and energetic and eager to serve his country,” wrote one of four mental health professionals, including two government officials, who diagnosed PTSD in Mr. Gregg. He “returned impaired by PTSD complicated by his disillusionment with the military operation in Iraq.”  After building a bridge across the Tigris River, his National Guard company effectively became an infantry unit. Mr. Gregg estimated that he searched well over 10,000 vehicles and fired over 1,000 rounds.  Mr. Gregg found checkpoint duty unbearable, said Michael Furois, a Department of Veterans Affairs psychologist who treated him after his arrest. According to Mr. Furois’s testimony, Mr. Gregg disliked “standing guard at a gate when the Iraq civilians would bring in their dead or wounded and would be yelling and crying and blaming those at the gate for that occurring.”  After many months in Iraq, Mr. Gregg testified, he began to think about suicide, hoping that his “chance” at death would come if he volunteered for dangerous missions. His superior officer, Sergeant Long, testified that he selected him for a nighttime patrol team, instructing them never to hesitate when they perceived a threat because “if you hesitate, you’re dead.”  Cross-examining Sergeant Long, Mikal G. Hanson, an assistant United States attorney, asked him if he were implying that his instruction about hesitating had caused Mr. Gregg, on his return to the United States, to shoot “an unarmed civilian.”  “I hope not,” Sergeant Long said.  When Mr. Gregg’s tour of duty ended in March 2004, he started drinking heavily to ease his stress and expressed the wish that he had died in Iraq.  Mental health experts for the defense said, as one psychiatrist testified, that “PTSD was the driving force behind Mr. Gregg’s actions” when he shot his victim. Having suffered a severe beating, they said, he experienced an exaggerated “startle reaction” — a characteristic of PTSD — when Mr. Fallis reached for his car door, and responded instinctively.  Mr. Gregg’s trial lawyer put it theatrically: When Mr. Fallis rushed at Mr. Gregg, he said, Mr. Gregg switched into military mode. “What does he think?” the lawyer said. “Lethal threat, lethal threat, lethal threat, neutralize threat, boom, boom, boom, boom, boom, boom, boom, boom, boom, continues to shoot.”  The prosecutor, reflecting his skepticism about this explanation, asked Mr. Gregg if he had been a “walking time bomb” since Iraq. “You’re not telling this jury,” Mr. Hanson said, “that National Guard members like yourself that went through that experience are a threat to kill people?”  Mr. Gregg: “I wouldn’t know.”  The prosecutor also referred to Mr. Gregg’s military experiences for his own purposes, asking whether military trainers tried to strengthen soldiers’ minds as well as bodies.  “Not really,” Mr. Gregg said. “They actually break down your mind.”  “Break down your mind,” Mr. Hanson said. “Explain that to the jury.”  “They break down your mind, and then they try to build you back up,” Mr. Gregg said.  “Into a killer?” the prosecutor asked.  The jury found Mr. Gregg guilty of second-degree but not first-degree murder. The judge later referred to this as having “dodged a bullet, so to speak.”  Judge Kornmann also said in court that he found the case troubling, calling the sentencing hearing “one of those days” when he wondered whether he should have declined the offer by Tom Daschle, the former Senate majority leader from South Dakota, to nominate him for a federal judgeship.  “I see these stickers that people have on their vehicles saying, ‘Support the troops,’ ” Judge Kornmann said. “I don’t see much support for the troops as years go on when these people come back injured and maimed.”  Nonetheless, the judge said that Mr. Gregg did not deserve any of the “downward departures” from sentencing guidelines that his lawyers had requested in consideration of his military service, his PTSD and his crime-free record. The mandatory minimum for a federal offense involving a gun is 10 years, and Mr. Gregg’s lawyers indicated that they hoped he would be sentenced to no more than 12.  Judge Kornmann handed down a 21-year sentence.  Through a relative who works for the prominent law firm of WilmerHale, Mr. Gregg secured the company’s services; his case was taken pro bono.  In late June, Mr. Gregg’s lawyers filed a habeas corpus petition, seeing to vacate his conviction on the basis of ineffective assistance of trial counsel. Mr. Rensch, they argue, did not demonstrate that Mr. Gregg’s state of mind was heavily influenced by being “vividly aware of specific, dramatic instances of past violent acts” by his victim.  While Mr. Gregg awaits the outcome, he is locked in a federal medical prison in Rochester, Minn., where he tried to kill himself on one occasion and has been placed on suicide watch episodically. If all efforts to free him fail, he is projected to be released on July 22, 2023, a few weeks shy of his 42nd birthday.  A version of this article appears in print on , on Page A1 of the New York edition with the headline: Combat Trauma Takes the Witness Stand. Order Reprints| Today's Paper|Subscribe
Prosecutors, judges and juries are increasingly prodded to assess the role of combat trauma in crimes by veterans.