The gunman who opened fire in a Texas Baptist church on Sunday, killing at least 26 people, was once convicted of assault after he reportedly fractured his infant stepson’s skull.

Before 26-year-old Devin Kelley received a bad conduct discharge from the U.S. Air Force in 2014, he was court-martialed in 2012 for assaulting his ex-wife and child. Kelley struck his stepson so hard he fractured his skull.

“He assaulted his stepson severely enough that he fractured his skull, and he also assaulted his wife,” retired colonel Don Christensen, formerly the chief prosecutor for the Air Force, told the The New York Times. “He pled to intentionally doing it.”

As punishment, Kelley was confined in military prison 12 months, received a reduction in military rank and was discharged for “bad conduct” -- a step above a dishonorable discharge.

Kelley, who was described to Fox News by a childhood friend as a “happy, caring person,” was separately charged in August 2014 for animal cruelty.

He had jumped on and repeatedly punched his pet Husky -- an underweight puppy -- while he was living in a trailer park in Colorado Springs, Colorado, KMGH reported. Kelley denied beating the dog and said he jumped on it because it was acting aggressively toward another dog.

He was also the focus of a protective order issued in Colorado in 2015.

DEVIN PATRICK KELLEY SERVED IN AIR FORCE, WAS COURT-MARTIALED FOR ASSAULTING WIFE, CHILD

Authorities believe Kelley used a Ruger AR-556 rifle when he committed the deadliest shooting at a church in modern U.S. history. Authorities found that rifle at the church, while two handguns were recovered from Kelley’s vehicle.

Officials said hundreds of shell casings and 15 magazines with 30 rounds each were found at the church.

Academy Sports + Outdoors, a chain sporting goods store, told Fox News in a statement that Kelley had purchased two guns from two of their locations, both in San Antonio, on separate dates.

“Based on information we received from law enforcement, we confirmed that the suspect purchased two firearms from two San Antonio locations, one in 2016 and one in 2017," the statement read. "We also confirmed that both sales were approved by the National Instant Criminal Background Check System (NICS). We are cooperating with law enforcement as they investigate further.”

Those who are given a bad conduct discharge from the military are not barred from legally purchasing weapons.

A 1968 Gun Control Act made it unlawful for a licensed firearms deal to sell weapons to those who received a dishonorable discharge -- not a bad conduct discharge. Since Kelley was discharged on bad conduct, the law was not triggered.

However, Texas Gov. Greg Abbott said Monday on “FOX & Friends” that Kelley was denied a gun permit in the state.

"He was rejected either because he did not fully answer all the questions that are required to get a Texas gun permit, or he answered those questions wrong, that we still don't know," Abbott said.

Federal officials said Monday night that the Air Force didn't submit Kelley's domestic assault conviction into a national database that's used to conduct background checks, as required by the Pentagon.

An autopsy of Kelley's body found three gunshot wounds: one self-inflicted to the head and two -- one in the leg, another in the torso -- from the armed citizen who chased after him.

Fox News' Shira Bush and Madeline Farber and The Associated Press contributed to this report.