ELIZABETH — The gunman who killed two congregants at a Texas church last month had been charged years earlier with a felony gun offense in New Jersey, where prosecutors later downgraded the crime to a low-level misdemeanor that had nothing to do with firearms.

Since the Dec. 29 shootout at the West Freeway Church of Christ in White Settlement, Texas, much has come out about Keith Thomas Kinnunen's criminal record, which seems to follow a pattern: He would get charged with serious, sometimes violent crimes, which later were pleaded down to less-consequential offenses.

While plea deals are common in the criminal justice system in New Jersey and elsewhere, this case raises questions about the effectiveness of laws meant to bar certain people from buying or possessing guns.

Despite Kinnunen's history of mental illness — including a 2012 judge's order declaring him unfit to stand trial — it does not appear his plea deals were enough to trigger legal provisions limiting gun ownership, which would apply in cases involving domestic violence and felonies.

Linden police arrested Kinnunen in Sept. 12, 2016, after finding him with a 12-gauge shotgun, the same kind he used last month in the Texas church. Linden police said Kinnunen, who had been riding a bicycle near the Phillips 66 refinery, told them he was homeless and was taking photos of "interesting sites."

He was charged with unlawful possession of a rifle/shotgun, a third-degree indictable crime that in other states would be called a felony.

In January 2017, he accepted a plea deal finding him guilty of criminal trespass, a low-level misdemeanor that state law classifies as a petty disorderly persons offense.

As part of the deal, a Superior Court judge in July 2017 sentenced him to 303 days of time served at Union County Jail and ordered him to forfeit his weapon.

A spokesman for the Union County Prosecutor's Office last week defended the deal as "fully reasonable and legally appropriate."

"The assistant prosecutor assigned to this case consulted with a member of the Union County Police Department Ballistics Unit, who determined that because the recovered weapon was missing a fundamental component, it was inoperable under the definition outlined in the applicable statute," the spokesman for the office said in a written statement.

In this still frame from livestreamed video provided by law enforcement, churchgoers take cover while a congregant armed with a handgun, top left, engages a man who opened fire. (West Freeway Church of Christ/Courtesy of Law Enforcement via AP)

In Oklahoma in 2011, Kinnunen was charged with felony assault and battery with a dangerous weapon after attacking the owner of a doughnut shop. He was also charged with arson in a separate offense in which he was accused of starting a fire at a cotton field with flaming tampons. Police also said that he forced his underage to throw around a flaming football.

An Oklahoma judge in 2012 ruled him mentally incompetent to stand trial and committed him to a psychiatric facility. A year later, he pleaded guilty after the charges were downgraded to misdemeanors.

In 2012, an ex-wife in Oklahoma filed for a protective order that described him as "a violent, paranoid person with a long line of assault and battery w/ and without firearms."

Another ex-wife told The Associated Press that they divorced in 2011 after he got “more and more” into drugs that "messed with his head."

In 2008, he was charged with aggravated assault in Texas. The charged was later downgraded to misdemeanor deadly conduct.

On Dec. 29, Kinnunen walked into the packed White Settlement church wearing a fake beard and wig and opened fire, killing 67-year-old Richard White and 64-year-old Anton “Tony” Wallace. Kinnunen was then killed by a single shot by security volunteer Jack Wilson.

The motive for the attack was unclear. The church had previously helped feed the shooter. The pastor told The Associated Press that Kinnunen was angry when the congregation declined to give him money.

The Associated Press contributed to this report.

Enter your number to get the NJ 101.5 app

Sergio Bichao is deputy digital editor at New Jersey 101.5. Send him news tips: Call 609-359-5348 or email sergio.bichao@townsquaremedia.com.