SAN BERNARDINO, Calif. (AP) - New details are emerging in the San Bernadino school shooting Monday afternoon that left three dead and one injured.

School district officials say classes at North Park Elementary are canceled for at least Tuesday and Wednesday. Counselors are being made available at a nearby middle school for students, family and staff.

The closure comes a day after a man walked into his estranged wife's classroom and opened fire, killing her and an 8-year-old student. He then fatally shot himself. A 9-year-old student who was wounded in the shooting remains hospitalized Tuesday. He and the boy who died were standing behind their special-education teacher, Karen Elaine Smith.

The 8-year-old boy shot and killed along with his teacher was born with a genetic condition and had survived heart surgery. Schools superintendent Dale Marsden said Tuesday that Jonathan Martinez had Williams syndrome, a rare disorder characterized by learning delays, mild intellectual disability and heart problems. Marsden said children with Williams syndrome tend to be social, friendly and endearing and, by all accounts, Jonathan was a happy child.

Officials said a 9-year-old classmate who was also shot is stable, watching cartoons, and expected to recover.

Police say the shooter, Cedric Anderson, had been estranged from Smith and had a history of weapons, domestic violence and possible drug charges. Authorities say the man had four arrests over 20 years but none of the cases ended in a conviction.

Police Chief Jarrod Burguan says Anderson wasn't employed but previously had work as a maintenance worker and a pastor. He didn't provide more details.

The police chief also said a note believed to be from Anderson had been found that talked about needing closure and feeling disrespected. Police say the couple married in January and separated in the middle of March.

The San Bernardino police chief said those close to the teacher mentioned that he had threatened her after she moved out. Chief Burguan told reporters Tuesday that Cedric Anderson had accused Karen Smith of infidelity in their short marriage. He said police hadn't confirmed those details.

Smith's loved ones told investigators that she had said she was concerned about her husband's odd behavior and that he had made threats against her, but not to shoot her. Police say the couple, both 53, married in January and separated in the middle of March. Smith moved out of their home and had been staying with family.

A candlelight vigil is planned for the victims Tuesday evening at North Park Elementary.

(Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.)