One after another, relatives of Bruce Glidden stepped up in court to ask Matthew Gwyer the only question he could not answer: Why?

In an unusual juvenile hearing Thursday, Gwyer, 18, took responsibility for shooting Glidden, then 47, as he slept in his Scarborough home, and for vandalizing one of Glidden’s vehicles, before fleeing into the night on Jan 18. Glidden was shot in the abdomen and released from the hospital two days after the attack.

If Gwyer obeys court orders, he may completely avoid jail time.

District Court Judge Peter Darvin ordered Gwyer committed to Long Creek Youth Development Center in South Portland, where he is to undergo treatment for unspecified mental disorders that apparently played a role in the so-far unexplained shooting.

If, however, Gwyer refuses to undergo treatment and meet with the victims to explain his actions, he could face a future felony assault charge and prison time. The most serious charge of attempted murder was dropped as part of the deal with prosecutors.

Relatives of Gwyer and the Gliddens, including the victim, Bruce Glidden, packed the benches Thursday in Portland Unified Criminal Court, where they read victim-impact statements into the record as Gwyer sat motionless at the defense table, flanked by his attorneys, Gina Yamartino and Edwin Chester.

Almost immediately after he was arrested four days after the crime, Gwyer began expressing deep, heart-felt remorse, Chester said, but his motive remains unclear.

“One of the reasons Matthew is not addressing (the Glidden family) today is because he does not himself have the answers,” Chester said, before the judge signed off on the disposition. “He cannot answer for himself what his motivations were.”

The hearing was an emotional development in a case that caused consternation and speculation in the Scarborough community, at first for its brazen, shocking circumstances, and then because of the person arrested four days after the attack. Far from the image of a hardened criminal, Gwyer, then 17, was a gawky, church-going honors student who “would never hurt a flea,” one family friend recalled, in shock, after the arrest.

Although Gwyer and the Gliddens’ two teenage children attended Scarborough High School together, the families seemed otherwise unconnected. At the court proceeding, it was revealed in victim impact testimony that each Glidden child had a class with Gwyer, but the extent of the relationships he had with them, or how their interactions may have influenced his motive, is still unknown. Glidden’s daughter, Sophie Glidden, was present for the hearing and sat between her parents, but their son, Mahlon, was absent because he was attending a football camp.

At times during the more than two-hour proceeding, the judge, Gwyer’s attorneys and even the juvenile prosecutors remarked at how atypical the circumstances were, in light of Gwyer’s history and the results of the hearing, considering the seriousness of the charges. . And Gwyer’s behavior since his arrest has also been uncharacteristically good.

Chester said that since Gwyer was first incarcerated at Long Creek, he has earned new privileges because of his spotless behavior. He has even become a mentor to two children incarcerated there, and won the praise of the facility’s chaplain, who spoke at the hearing, unprompted by Gwyer’s attorneys.

“This case is extremely unique in the amount of unknowns,” said Assistant District Attorney Christine Thibeault, citing no record of school disciplinary action, mental health problems or history of behavioral issues. “Nevertheless, we have an extremely disturbing course of events.”

Had Gwyer committed the shooting roughly 10 weeks later, after his 18th birthday, he would have likely faced prison time for attempted murder in an adult system aimed at punishing offenders and deterring future crimes. But because he was 17 and the case was pursued in juvenile court where the goal is rehabilitation, the maximum penalty was commitment until age 21.

Sheriff’s deputies who transported Gwyer for his court appearance Thursday at first told a Portland Press Herald photographer that Gwyer was not in the transport vehicle, then tried to distract the photographer while Gwyer was taken inside the courthouse. The deputies then erected dividers on the sidewalk to try to prevent another Press Herald photographer from taking a photo as Gwyer left the courthouse after the hearing.

After the juvenile portion of the hearing was complete, an adult criminal hearing was held in which Gwyer pleaded guilty to an aggravated assault charge, with the sentencing suspended until his 21st birthday in March 2019. If he completes treatment and satisfies court requirements, that felony may be reduced or dismissed.

Whether this outcome was satisfying to the Glidden family was also not known, and they declined to comment.

But during her victim-impact statement, Amy Glidden, Bruce Glidden’s wife, made clear her desire for justice.

“Please sentence Matthew Gwyer to the harshest sentence possible,” Amy Glidden asked Darvin.

During her statement, Amy Glidden described the night of the shooting in visceral detail, with details never revealed by police – including that Gwyer had parked in a neighbor’s driveway to avoid alerting the family; and how he at first rang the doorbell to their Ash Swamp Road home and hid behind a tree, armed with a 9-mm pistol; or how Gwyer had taken a pink, granite rock and smashed the windows of a Jeep normally driven by Mahlon Glidden and scratched vulgarities into the car’s paint – smiley faces and swastikas, she said. When Gwyer was pulled over four days after the shooting, police found chunks of the same distinct pink granite stuffed in his pockets, and the pistol used in the shooting.

Amy Glidden said it was the doorbell that first woke her, but she thought she was dreaming and went back to sleep.

Then gunshots rang out.

“I ran downstairs to find my husband writhing on our family room floor,” she said. “I can also replay over and over the fear and worry on my son’s face as he found his father bleeding.”

As she stood and watched in horror, she recalled the sensation of cold wet snow, tracked in by Gwyer, on her bare feet, a sensation she said she will never forget.

“Ultimately what I want from all of this is for my family to feel safe in our own home,” she said. “I also want answers – why did Matthew target our family?”