The gunman in a mass shooting at a Texas church last year told a military judge in 2012 he "would never allow myself to hurt someone" again while admitting to abusing his stepson and a long struggle with anger, according to Air Force records obtained by The Associated Press.

The documents and transcripts offer a rare look at Devin Patrick Kelley speaking at length and in his own words, as few examples have previously surfaced in the six months since he opened fire during a Sunday service in tiny Sutherland Springs, Texas.

Kelley killed more than two dozen people in November 2017 in the worst mass shooting in Texas history. He died of an apparent self-inflicted gunshot wound after he was shot and chased by two men who heard the gunfire at the church.

"I don't think adults change. I don't think people change," Kelley said during his court-martial at Holloman Air Force Base in New Mexico, according to a transcript. He was convicted of assaulting family members and ultimately given a bad conduct discharge.

"I believe in miracles. I believe in angels and I believe in demons, but I think for most people, they're going to be who they are and live their lives out, but based on the choices they make, if they're a wife beater, they're gonna probably beat their next wife. If they're a child beater, they'll probably beat their own child."

The AP on Thursday obtained hundreds of pages surrounding Kelley's court-martial through a Freedom of Information Act request.

Kelley admitted to pushing his stepson while the toddler crawled on the floor and slapping him across the face when he wouldn't stop crying. He cracked the child's skull and broke his clavicle. His ex-wife wrote an affidavit that described in graphic detail how Kelley repeatedly hit her, choked her and twice pointed a gun at her.

She wrote that when she suggested they get a divorce during a drive, Kelley lost control of their car while grabbing her hair, causing them to strike a guardrail.

"Sir, this is the worst thing I've done in my life and I will never allow myself to hurt someone like this again," Kelley said.

Five years later, Kelley went aisle to aisle at the First Baptist Church in Sutherland Springs looking for victims. Witnesses said he shot crying babies at point-blank range and the dead ranged in age from 18 months to 77 years old. Authorities put the official death toll at 26 because one of the 25 people killed was pregnant.

Investigators have said the attack appeared to stem from a domestic dispute Kelley was having with his mother-in-law, a member of the church who wasn't present that day.

Air Force prosecutors had pushed for a stiffer sentence than the 12 months confinement and bad conduct discharge that Kelley received from the military jury. They wanted four years of prison time so that he might get his anger under control, according to the trial transcript.

"Who's next?" said Capt. Brett Johnson, the assistant trial counsel. "What are we going to do to ensure that this does not happen again? That the next time he lashes out in anger to strike a child, to choke a woman, let him think back to the four (years) he sat in confinement, then maybe he will think again."

The records show Kelley struggled to comply with the exacting standards of military service. A May 2012 evaluation rated his performance as an airman first class "average" and noted that he'd received letters of reprimand for insubordination to a superior enlisted service member and an assault on a family member. Kelley did not meet the requirements for conduct, character and military bearing, according to the evaluation.

After a confrontation with a civilian colleague over work duties, Kelley described being "scared and holding back tears" when the person yelled and tried to intimidate him, according to his summary of the incident, which is among the documents released. The civilian wanted to settle the dispute immediately in front of a staff sergeant, but Kelley said he needed time to get control of his emotions.

During the court-martial, Kelley submitted pictures of him in Boy Scouts, handling pets on his family ranch and rock climbing with his family. He described being bullied on the football team in high school, hiding "behind alcohol and self-denial" and considering suicide before reconnecting with God.

"It will take a lifetime of living up to the promises I've made to myself, God and here to prove I have changed," Kelley wrote in an affidavit. "I know I can be better, I just need a chance to prove it."

___

Lardner reported from Washington, D.C.

__

Follow Paul J. Weber on Twitter: www.twitter.com/pauljweber