A 9-year-old boy died Friday night from head injuries suffered when he was caught between a motorized room partition and a wall in his school gym, police said.

The boy, Wesley Lipicky, and his teacher simultaneously pressed a button to operate the partition at Franconia Elementary School, causing the device to malfunction, said Sgt. Aaron Pfeiff, a Fairfax County police spokesman.

Crisis counselors will be at the school Monday to help students and teachers.

“I am deeply saddened by this tragic accident,” Scott Brabrand, superintendent of Fairfax County Public Schools, said in a statement. “Our first priority is supporting the family, students and staff as they cope with this sudden loss.”

The school district will work with police and the county to review safety protocols and procedures, Brabrand said.

According to a police statement, the incident occurred at about 4:45 p.m. Friday while the boy was in an after-school program, School Age Child Care (SACC), at the Beulah Street school.

Emergency services were called immediately and police and fire officials responded, Pfeiff said.

The boy suffered traumatic head injuries and was pronounced dead at Fairfax Hospital Friday night.

An autopsy performed Saturday morning found the death to be accidental and “no charges are expected in this tragic case,” police said in a statement.

John Torre, Fairfax County Public Schools spokesman, said the county runs the after-school program. A county spokesman it is a county-run, school based program. He expressed condolences.

The school principal, Terri Edmunds-Heard, sent parents a letter Saturday telling them what happened and offering condolences.

“We will miss Wesley very much,” she said in the letter. “He was an endearing child whose bright smile and enthusiasm for school inspired the love of all who knew him.”

She encouraged families who knew Lipicky to talk about the third grader.

“Any death is difficult for children to understand,” she said. “Wesley’s death is particularly difficult due to his young age and its unexpectedness.”