LAWRENCE, Kan. (AP) — A judge ruled Tuesday that an Illinois man and his wife will stand trial in Kansas on child abuse charges after two of their children were found in a Walmart parking lot tied up, a practice the father's lawyer described as a religious belief in the family and a way to guard against demons.

Douglas County Judge Paula Martin said at the conclusion of a preliminary hearing there was enough evidence to try Adolfo Gomez, 52, and his wife Deborah Gomez, 44, on two counts each of child abuse. The father also faces an additional count of obstruction for resisting arrest.

The Northlake, Ill., pair have been in custody since June 13 when police found two of the Gomez children, ages 5 and 7, tied up and with duct tape over their eyes outside a Walmart in Lawrence. The couple's three other children, ages 12, 13 and 15, were in the family's SUV unrestrained. The children are in protective custody.

Martin also said the state did not prove its case on five previous aggravated endangerment counts against each parent because of the way the charges were worded. Debby Moody, assistant Douglas County district attorney, said she would amend the five counts and refile them before the couple's arraignment Thursday.

Lawrence police Detective Randy Glidewell testified Tuesday that when he interviewed Adolfo Gomez the day of the arrest, Gomez said he had been listening to an online preacher who was predicting the end of the world and that a "darkness had come over the house" in Illinois.

"And the world was coming to an end, and that's why they left," Glidewell added, referring to the father's comments to police.

The detective also said Adolfo Gomez told him he hadn't slept in nine days, and that Gomez was particularly concerned about one of the younger children. Gomez described the child as "acting like he was possessed," Glidewell said.

"He was scared (the child) would hurt some of the kids," the detective said.

Lawrence police officer Hayden Fowler testified that one of the older children told him the family believed there were "demons" in their home and outside their SUV in the parking lot, and that the coverings on the vehicle's windows were there to keep the demons out.

Adolfo Gomez's lawyer, Skip Griffy, also said during the hearing that blindfolding and binding the younger children was part of the family's religious beliefs, and that it was not done frequently or as a punishment but as a way to protect the children from demons.

"Their actions were taken out of their religious beliefs, that these children were possessed," Griffy said. He added that the children had no injuries.

Angela Keck, a lawyer for Deborah Gomez, distanced her client from Adolfo Gomez, saying the woman had no control over her husband.

"She was doing her best to protect herself and her children when Mr. Gomez was having a kind of religious experience," Keck said. "You have not heard anything that these children's lives were in any danger in any way."

Moody, however, said the "danger to these children was real."

"These types of bindings and blindfolds come into play when you're talking about ... prisoners of war," the prosecutor said.

Deborah Gomez was involved in the abuse and when presented with an opportunity to help, "she went shopping for duct tape, two tarps and a baseball bat," Moody said, alluding to the list of items police discovered in the mother's shopping cart at Walmart when the children were found.

"It was a team effort, your honor," Moody said. "What happens when kids in the Gomez family are possessed? They get bound and they get blindfolded."