The judge knew that Sgt. Joseph Serna had been through a lot.
The former Special Forces soldier did four combat tours in Afghanistan over a nearly two-decades-long career with the U.S. Army. Through those years, the Fayetteville Observer reported, Serna was almost killed three times: once, by a roadside bomb, then again by a suicide bomber.
During a tour in 2008, Serna and three other soldiers were driving down a narrow dirt road in Kandahar when their armored truck toppled into a canal, the Associated Press reported. As water filled the vehicle, Serna struggled to escape.
It was his fellow soldier, Sgt. James Treber, who saved him.
"I felt a hand come down and unfasten my seat belt and release my body armor," Serna recalled to the AP. "Sgt. Treber picked me up and moved me to a small pocket of air. He knew there was not enough room for both of us to breathe so he went under water to find another pocket of air."
Treber died from the accident, but Serna survived. He was the only one who did.
While Serna's years in combat earned him three Purple Hearts and other military accolades, like many combat vets, he's been unable to leave the battlefield behind him. Since returning to the U.S., the decorated Green Beret has suffered from post-traumatic stress disorder, WTVD reported, and been charged with driving under the influence.
He entered the veteran's treatment court program in Cumberland County, N.C., over which state District Court Judge Lou Olivera presides.
Serna has fought to stay sober, appearing before Olivera 25 times to have his progress reviewed. He confessed to Olivera that he lied about a recent urine test last week, according to WRAL.
In response, Olivera sentenced Serna to one day in jail.
The judge drove Serna to the jail in a neighboring county.
"When Joe first came to turn himself in, he was trembling," Olivera told the Fayetteville Observer. "I decided that I'd spend the night serving with him."
"Where are we going, judge?" Serna asked, the Observer's Bill Kirby Jr., reported Wednesday.
"We're going to turn ourselves in," the judge said.
As Serna sat down on the cot in his cell, WRAL reported, he heard the door rattle open again and saw Olivera standing before him. Olivera sat down beside him. Someone came and locked the door.
"This was a one-man cell so we sat on the bunk and I said, 'You are here for the entire time with me?'" Serna told WTVD. "He said, 'Yeah that's what I am doing.'"
A Gulf War veteran himself, Olivera was concerned that leaving Serna in isolation for a night would trigger his PTSD.
The two passed the time trading stories of their experiences in the military. Serna told WRAL: "It was more of a father-son conversation. It was personal."
"They have worn the uniform and we know they can be contributing members of society," Olivera said. "We just want to get them back there."
The incident, which occurred April 13, was reported Thursday in the Observer under the headline: "Judge's unbelievable compassion for a veteran."