( Brian O'Callaghan, left, was sentenced to 12 years in prison Tuesday for killing his three-year-old adopted son, Madoc. (Photos from Montgomery County State's Attorney's Office.) )

A former division chief for the National Security Agency, who admitted he hurled his 3-year-old adopted son against a wall in his Maryland home, was sentenced to 12 years in prison Tuesday for the boy’s death.

“I killed my son,” Brian O’Callaghan, 38, said in Montgomery County Circuit Court. “He’s gone. A defenseless little boy that I loved is gone.”

Prosecutors argued the abuse of Madoc lasted longer than the single outburst.

“This was not the end of it. We know from the autopsy that there were multiple impact injuries,” said Assistant State’s Attorney Donna Fenton, who had asked for a 40-year sentence, “this child was beaten to death.”

The six-hour sentencing hearing swung from raw emotion — Madoc’s death while his older brother was downstairs and confused by noises he was hearing — to clinical discussions of O’Callaghan’s state of mind. He had served as a Marine in tours of Kosovo and Iraq, seen the aftermath of explosions, seen dead children and was later diagnosed with post-traumatic stress disorder, testimony showed.

Brian O'Callaghan shown with his wife, Jennifer, in a 2013 photo. (Courtesy of family)

His attorney, Steven McCool, described that history as a mitigating factor. “He didn’t set out to do this,” he said.

As attorneys delved into O’Callaghan’s medical records at the hearing, it became clear he had hidden his illness from an adoption agency as he and his wife sought to bring a child to the United States from South Korea. They already had another son at home.

At one point, according to Circuit Judge John Debelius, a counselor from the Department of Veterans Affairs guided O’Callaghan on how to taper his dosage of psychotropic medications so he could pass a drug screening required in the adoption process. The VA instead should have been advising him to abandon adoption plans, the judge said.

“It’s appalling to me,” Debelius said.

He agreed that PTSD was a factor in the crime. “All of this took its toll,” the judge said, speaking to O’Callaghan. “It didn’t cause this. But it set you up to make an incredibly horrible choice.”

O’Callaghan’s life had seemed defined by success. He graduated from the University of Northern Colorado, attended an Arabic language institute in Cairo, and in Iraq, was a translator for infantry units. Later at the NSA, he held the post of division chief in the Office of China and Korea, according to McCool.

After Madoc’s death in February 2014, Montgomery police charged him with first-degree murder and first-degree child-abuse resulting in death. He pleaded guilty to the abuse charge, setting the stage for Tuesday’s sentencing hearing as part of an agreement to drop the murder charge.

Born prematurely in South Korea in May 2010, Madoc was placed in foster care in that country. By 3, he had been diagnosed with a speech delay and learning difficulties, court files show. In Montgomery County, O’Callaghan and his wife Jennifer cleared an adoption process through Catholic Charities and in late October 2013 brought him to their home in Damascus.

Jennifer used maternity leave to care for him, returned to work, and Brian O’Callaghan then took paternity leave. On a Friday – January 31, 2014 – Jennifer traveled to New Jersey, leaving her husband, their elder son, and Madoc at home.

In court Tuesday, Richard Restak, a neuropsychiatrist hired by O’Callaghan’s attorney, said that at the time, O’Callaghan was facing post-traumatic stress disorder, a short-temper disorder, changes to his medications and a very stressful job. “The combination of explosiveness and irritability and things like that would make him frustration-intolerant,” Restak said.

He said O’Callaghan described what happened Feb. 1 during a conversation:

He and the boys had gone to Dunkin’ Donuts. When they came home, Madoc was tired but when Callaghan took him to rest “Madoc was jumping up and down on the bed,” Restak said. “At a certain point, he reached out towards Brian O’Callaghan with his hands. And that seemed to set the explosion off in which he hurled him across the room.”

Debelius described what Madoc’s final moments must have been like – how despite the boy’s slow development, despite the language barrier, he knew enough to be terrified.

“He understood that there were people that he looked to — to be nurtured, to be fed, to be coddled, to be cared for,” Debelius said, speaking slowly. “ To be subjected to horror and violence and death at the hands of that person — it is unfathomable.”

The judge said whether O’Callaghan killed the child in a single outburst, or beat him 12 times, was a distinction that mattered less to him than the final outcome.

“The fact of it is this, you beat this child to death,” he told O’Callaghan. “There is not a kind and gentle way to do that. I can’t parse it out ... It was horrible. It was absolutely horrible. For Madoc’s sake, I hope this was quick.”

But Debelius said he had to balance out that death with his belief the killing wasn’t premeditated, and didn’t constitute abuse over a long period.

Fenton, the prosecutor, went through O’Callaghan’s actions after he’d inflicted the lethal injuries. At the time, O’Callaghan’s other son was downstairs. “He heard insistent banging,” Fenton said.

The boy came upstairs. He saw his brother on the floor, saw his dad sitting next to him, thought it was unusual, but went back downstairs, Fenton said.

About four hours later, Fenton said, O’Callaghan, Madoc, and his other son went to an emergency room, O’Callaghan wearing a baseball cap and carrying Madoc over his shoulder as if he were asleep. He spoke to a hospital employee for several minutes without relaying how critical the situation was. It was only after the employee touched Madoc, who had a body temperature of 91 degrees and was in full cardiac arrest — that the hospital actually realized the urgency of the situation.

Madoc was airlifted to Children’s National Medical Center, where he died after being taken off life support two days later, according to prosecutors.

“We know that he has PTSD,” Fenton said in court. “The records state exactly how he was treated, how he was medicated. But none of that is an excuse for what happened.”

Before Debelius handed down his sentence, O’Callaghan spoke.

“There never should have been a place safer on earth for Madoc than being alone in a room with me,” said O’Callaghan, standing up in court and wearing a dark green jail jumpsuit. “But that day, he was not safe with me.”