Updated

A Coast Guard rescue swimmer whose disappearance led to a massive search in Hawaii pleaded guilty to desertion Tuesday, saying he left work one day, decided never to return and spent the next three months camping in the mountains. A military judge sentenced him to more than six months confinement and a bad conduct discharge.

During a special court-martial in Honolulu, Petty Officer 1st Class Russell Matthews pleaded guilty to desertion and wrongful use of marijuana. In exchange for his guilty plea, the Coast Guard dismissed charges of being absent without leave and causing the Coast Guard to conduct a search when there was no need.

Matthews' sentence also includes forfeiture of $2,000 of pay per month for a year, which he can opt to have sent to his two children. He'll also be downgraded to the third-lowest rank. The Coast Guard says the six months' confinement is on top of the 119 days he's already served at a Navy brig.

He wanted to leave the Coast Guard to bury the pain of losing crewmembers in a 2008 helicopter crash, he said. He was supposed to be with that crew but was hospitalized with appendicitis at the time of the crash. Adding to the pain was a bicycle accident, where his first wife was pulling their two sons on a trailer. She suffered a traumatic brain injury and later committed suicide. He deserted near the one-year anniversary of her suicide.

"Your honor, I left work and I didn't have any intention of going back," he testified, describing how he went to pick up his children from school on Oct. 9 and then got into an argument with his wife. He then drove to Kaena Point, a remote part of Oahu, and walked on the beach for several hours. Afterward, he camped in the mountains behind his kids' school, he said, where he stayed until he showed up at his wife's home in mid-January.

"That's a long time to be camping," said Coast Guard Cmdr. Kevin Bruen, the judge presiding over the court-martial. "How did you sustain yourself?"

"I had $20 in my pocket," Matthews said softly. "I did some... stuff I try not to remember."

Meanwhile, the Coast Guard launched a massive search. Members of the Coast Guard who participated in the search that scoured more than 10,000 square miles testified about the motivation to find one of their own, the speculation he may have tried to kill himself and then the mixed emotions that came when he turned up alive.

Pilots flew 64 hours searching over the waters off Kaena Point, taking Coast Guard members away from their normal duties and taxing aircraft. "He's part of our unit...we are family," said Cmdr. Prince Neal. Rescuers mourned his loss, only to find out he was alive. They felt happiness for his children, but also confusion, Neal recalled.

Matthews didn't discuss more about his time in the wilderness, only saying he simply went back to where he lived and realized his wife and children had moved. The memories of what happened next are sketchy, he said, recalling that paramedics were called because he had a cut on his head and he ended up in police custody.

"It was not my intention to turn my back on my unit or the Coast Guard," Matthews said. "I cannot change the past but I vow to make things right in the future."

Lt. Kelly Vandenberg, a Coast Guard attorney prosecuting the case, said by "hanging out in the woods," the people who suffered the most are his children.

One of Matthews' defense attorneys, Lt. Cmdr. Christopher Deerwester, said Matthews loved the Coast Guard and didn't act in spite. Finding a campsite overlooking his children's school was his way of not abandoning them, Deerwester said. He also said Matthews smoked marijuana to "self-medicate."

Coast Guard attorneys said his two sons are in the custody of his first wife's family on the mainland.

Before being led away, Matthews kissed his wife, who sat alone, dressed in black, in the back of the courtroom. She declined to comment and left the federal courthouse in tears.