Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A gunman opened fire inside his estranged wife’s elementary school classroom in San Bernardino, California, on Monday, killing her and one of her young students before turning a revolver on himself, officials said.

The suspect, Cedric Anderson, entered the classroom and, without saying a word, fatally shot his wife, Karen Smith. Two students who were behind Smith were struck by gunfire — including Jonathan Martinez, 8, who later died at a nearby hospital, Police Chief Jarrod Burguan told reporters. The other student, an unidentified 9-year-old, was hospitalized in stable condition Monday afternoon.

Anderson and Smith, both 53, had been separated, Burguan said. Officials said the North Park School classroom was for special-needs students, but do not believe the 15 children inside were specifically targeted, Police Capt. Ron Maass said at a news conference.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

And "there was no indication the gun was visible upon his arrival at the school," Maass told reporters, referring to the gunman. Anderson had told the school he had come to drop something off for Smith, Burguan said.

Authorities are looking into Anderson's criminal background, which includes domestic violence and weapons charges. A .357 revolver was found next to Anderson, who is believed to have fired six rounds before reloading, Burguan said.

Anderson opened fire "very, very quickly upon entering the classroom," around 10:30 a.m. local time, Burguan said. A short time later, police reported the "current threat at North Park ES has been neutralized."

NBC News Alerts:Be the first to know about breaking news. Sign up here.

A shaken neighbor told NBC News the first inkling she got that something was amiss was when she "noticed helicopters circling."

"I realized there were two, and I looked outside and the kids were being evacuated up our street," said the woman, who asked not to be identified.

Emergency personnel respond to a shooting inside North Park School Elementary School on Monday, April 10, 2017, in San Bernardino, Calif. Rick Sforza / Los Angeles Daily News via AP

Several of the children appeared to be crying and holding the hands of their teachers, she added.

San Bernardino was the setting for one of the nation's worst mass murders. On Dec. 2, 2015,Syed Rizwan Farook and Tashfeen Malik barged into a county health department Christmas Party and opened fire, killing 14 people and wounding 22 others.

The radicalized couple was later killed by police.