North Park Elementary School, San Bernardino
A student who was evacuated after a shooting at North Park Elementary School is embraced after groups of them were reunited with parents waiting at a high school in San Bernardino, California, April 10, 2017. REUTERS/Mario Anzuoni

Law enforcement officials in San Bernardino, California, identified Cedric Anderson as the shooter who opened fired at an elementary school Monday killing his estranged wife — a teacher — and an 8-year-old student before shooting himself.

The incident happened at North Park Elementary School’s special-education classroom that had first and fourth graders, according to reports. Anderson walked in to the classroom with a .357 revolver and fatally shot 53-year-old teacher Karen Elaine Smith, whom he married a few months back.

Two children — aged 8 and 9 — standing behind Smith were also hit by the gunfire. The 8-year-old student, identified as Jonathan Martinez, was airlifted to Loma Linda University Medical Center where he died soon after arriving, San Bernardino Police Department Chief Jarrod Burguan said. The second student, whose name was not released, is reportedly in stable condition.

After opening fire, the 53-year-old resident of Riverside, California, shot himself dead, the police said.

Smith’s colleagues knew she and Anderson were separated for about a month and he entered the school on the pretext of dropping something for his estranged wife, according to the police.

"No one has come forward to say they saw this coming," Burguan said.

Officials reportedly said Anderson had a history of weapons, domestic violence and possible drug charges that resulted in a brief marriage. He is also reported to have been active on social media. He frequently wrote social media posts about his wife over the past month and posted pictures of their wedding and honeymoon in Sedona, Arizona, the Associated Press reported.

Irma Sykes, Smith’s mother, said her daughter and Anderson were friends for some four years before getting married. However, the teacher parted ways with him after about a month, according to Sykes.

“She thought she had a wonderful husband, but she found out he was not wonderful at all. He had other motives,” Sykes told the Los Angeles Times, adding that Smith was a mother to four children. “She left him and that’s where the trouble began. She broke up with him and he came out with a different personality. She decided she needed to leave him. She was going to divorce him.”

Following the shooting, the elementary school was placed on lockdown. Classes were canceled for Tuesday and Wednesday.