This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

A 53-year-old man who walked into a San Bernardino elementary school classroom and opened fire was targeting his estranged wife, the teacher, to whom he had only been married a few months, authorities said.

A photo posted to Cedric Anderson’s Facebook on Feb. 6, 2017, shows him with Karen Smith.

Cedric Anderson walked onto campus at North Park Elementary under the guise of dropping something off for his wife but instead pulled out a large-caliber revolver and opened fire on her without saying a word, according to San Bernardino Police Chief Jarrod Burguan.

Karen Smith, 53, who taught students with special needs, died at the scene, as did Anderson, after he finished unloading a round that also struck two of Smith’s young students, reloaded and shot himself, police said. One of the boys, 8-year-old Jonathan Martinez, later died at the hospital, while another 9-year-old boy is listed in stable condition.

The couple was wed Jan. 28 at Bethesda Temple Church in the Hyde Park neighborhood of South L.A., a wedding invitation posted on Evite shows.

On Feb. 6, Anderson posted a video to Facebook from their honeymoon in Sedona in which the couple appears blissful and carefree.

“We’re having such a good time,” Smith says with a smile.

A photo posted to Cedric Anderson’s on Jan. 29, 2017, shows him with Karen Smith.

Anderson shared numerous moments from their budding marriage on the social network, including wedding photos, date nights and even which shows the couple was bingeing together. On Feb. 27, he shared a video with the caption, “I love being married to Karen Smith-Anderson!”

“What I love about my wife — boy,” Anderson says in the video, smiling and shaking his head. “She is making me really happy. She knows when to ignore me. It makes a happy marriage.”

But somewhere, things turned sour. They’d been separated for at least a month, according to SBPD’s Burguan, but it’s unclear why.

“They’ve been separated for about the last month, month and a half, lately, when this incident took place,” he said Monday. “But there’s nobody that, in the investigation, has come forward to say that they saw this coming or knew this was potentially going to happen.”

Investigators will be looking into the reason the couple drifted apart, he added.

Burguan also said Anderson has a criminal history that includes weapons charges, domestic violence and possible drug charges. The domestic violence case was likely not from this marriage, he noted.

“It is my understanding that the domestic violence that I’m talking about is part of a criminal history that for the most part preceded this relationship,” Burguan said.

According to the Los Angeles Times, Anderson was charged with assault and battery in July 2013, as well as brandishing a firearm and disturbing the peace two months before that, though all the charges were dropped about one year later.

Nathan Morris, who lived next to the couple during their brief marriage, said he wasn’t very close to the couple but saw were no signs that could have predicted Anderson’s violent outburst.

“They seemed to keep to themselves, but I didn’t really know,” Morris told KTLA. “I have heard arguments coming out of there, it’s yelling, but it never seemed excessive. It seemed like normal family yelling.”

Smith’s mother, Irma Sykes, told the Times her daughter had known Anderson about four years before they were wed in January. Anderson moved into Smith’s home shortly after the wedding, she told the newspaper.

Sykes declined to discuss their relationship troubles but did confirm Smith had abruptly decided to withdraw from the union after she “found out he was not wonderful at all” and was planning to file for divorce, according to the Times.

Smith had been a teacher about 10 years, while Anderson was a pastor, the paper reported.