AUGUSTA — The father of a 4-year-old boy who brought a loaded gun to a Hallowell day care center in April pleaded guilty Tuesday to a charge of reckless conduct in connection with that incident and later apologized to everyone affected.

Adam J. Keene, 31, of Madison, received a deferred disposition. If he complies with the terms, in 10 months he can withdraw his plea and the charge will be dismissed.

Outside the courtroom, Keene said he did not know how his gun ended up at the day care in the backpack.

“However, I am deeply grateful that everybody is safe, that nobody was injured or harmed in any way, shape or form, and I do apologize to everybody that was affected or involved in this in any possible way,” he said.

On April 23, a worker at Rollins Family Child Care Center in Hallowell found a loaded .380-caliber semi-automatic handgun in Keene’s son’s backpack. The gun was removed from the premises. Chief Eric Nason of the Hallowell police said at the time that the gun’s safety was on, but a round was in the chamber.

Justice Donald Marden accepted Keene’s plea Tuesday in Kennebec County Superior Court after questioning Keene briefly about why there was a round in the chamber.

Keene told him he had wanted it to be ready to use when he switched off the safety if he needed it.

As soon as Keene’s hearing concluded, nine people, including several children from the day care center, left the courtroom. The prosecutor, District Attorney Maeghan Maloney, said they did not want to speak at the hearing.

Conditions of the deferred disposition ban Keene from possessing dangerous weapons and firearms and order him to complete a gun safety class, complete 20 hours of public service, give a public apology — which Maloney said would be in writing — and pay up to $1,000 for a restorative justice conference. The fee will pay for a facilitator to run the meeting and other associated costs.

At that conference, “victims would like an opportunity to sit down with Mr. Keene to talk about what happened, to hear from him and tell about how his actions affected them,” Maloney told the judge.

Margaret Micolichek, of the Restorative Justice Institute of Maine, said the meeting would allow people to share their feelings and begin to heal and also lessen embarrassment if they were to encounter each other later in the community.

Keene will surrender his concealed weapons permit but will be eligible to reapply for it after the deferred disposition period ends.

If he fails to comply with the terms of the deferral, he could be sentenced to up to 364 days in jail, the maximum penalty on the misdemeanor charge.

Maloney told the judge that while Keene says he doesn’t know how the gun got in his son’s bag, the state believes otherwise.

If the case went to trial, she said, a witness would testify that Keene told her “he threw the gun into the day care bag when carrying other bags into the house” and meant to remove it and put it into a locked safe.

Maloney also said the state would present the testimony of the day care worker who found the gun in the child’s bag.

The backpack was used to carry the boy’s belongings between his parents’ homes.

Speaking to reporters on the courthouse steps, Maloney said she was willing to offer the deferred disposition because Keene was taking responsibility for his actions, had no criminal record and was willing to comply with all the deferment conditions.

She said her goal was to keep the community safe.

“We need to make sure (guns) are kept out of the hands of children,” Maloney said. She said a child finding that gun might be likely to try to shoot it in the belief it was a toy.

The boy’s mother, Heidi L. Johnson, provided a written statement to reporters. “I just wish to remind everyone what this case is truly about: Keeping children safe,” she wrote. “I’m just a mom advocating for the safety of my son and the safety of the other children in the day care. That is what this case is about.”

Keene reported the gun missing to Skowhegan police on April 18, five days before it was discovered in the boy’s backpack.

His attorney, Philip Mohlar, also said Keene searched for it at various places he had been in Skowhegan.

“Adam’s happy to be moving forward and leave this thing behind him,” Mohlar said after the hearing. “He’s grateful that nobody was hurt and sorry that everybody went through so much.”

The boy now attends a different day care center, Mohlar said.

Shortly after the gun incident, Johnson, 34, of Hallowell, obtained a protection-from-abuse order against Keene in Augusta District Court. In her complaint, she wrote that Keene “kept a loaded gun in the house and pointed it at the family dog and threatened to kill him.” However, two weeks after the order was granted, Johnson asked for and received a dismissal of that order.

Betty Adams — 621-5631badams@centralmaine.comTwitter: @betadams