Two teens avoided juvenile detention on Monday for their roles in an October pepper-spray incident at Basalt High School that resulted in nearly 50 people being treated.

The boys, both 16, set off “a very terrifying event” because authorities initially didn’t know what the chemical was, said Aspen Deputy District Attorney Andrea Bryan.

“We unfortunately do live in an age” that has seen terrible incidents in schools, she said.

Bryan added that this was a foolish act by the youths, but one that caused a huge disruption.

The school was evacuated after one boy set off bear repellent in a bathroom just before noon on Oct. 12. Four students were taken to the hospital, and a total of 49 people were treated after breathing the fumes.

The main culprit pleaded guilty to reckless endangerment and obstructing school operations, both misdemeanors. Judge Gail Nichols of Pitkin County District Court sentenced him to two years of probation after hearing a tearful statement from the boy’s mother.

“This has been very hard for me,” she said. “If I feel badly now, it’s because our life has not been easy.”

The boy’s attorney, Kathy Goudy of Carbondale, said he knows his actions were hard on his mom, who is supporting the family.

But at the time, the boy didn’t realize the seriousness of his actions, Goudy said.

Now he is uncomfortable returning to Basalt High and feels he is a “total screw up,” she said.

“I know what I did was wrong,” the boy said. “If I could go back, I would’ve never have done it.”

Nichols noted that the bear repellent was 50 percent more potent than what police use to disperse crowds.

She agreed with Bryan that it was “very stupid” behavior that could have resulted in serious consequences.

“I think you really do care about helping your mother,” Nichols said.

She sentenced him to two years of supervised probation, 45 days in detention that she suspended and 40 hours of community service. He also must seek part-time employment and attend a Glenwood Springs high school.

The other boy, described in court as an accomplice, pleaded guilty to misdemeanor reckless endangerment.

His attorney, public defender Laura Koenig, said he had a minimal role and did not know the main culprit was going to spray the chemical. But he acknowledged that he could have done more to stop the incident.

He “didn’t spray it but kind of went along,” Nichols summed up. “Now you know how serious that spray was.”

The teen was sentenced to one year of supervised probation, 30 hours of community service, and also must attend school and seek a summertime job.