Rabbi Yisroel Goldstein, right, is hugged as he leaves a news conference at the Chabad of Poway synagogue, Sunday, April 28, 2019, in Poway, Calif. A man opened fire Saturday inside the synagogue near San Diego as worshippers celebrated the last day of a major Jewish holiday. (AP Photo/Denis Poroy)
PHOTO: Denis Poroy/AP
Rabbi Yisroel Goldstein, right, is hugged as he leaves a news conference at the Chabad of Poway synagogue, Sunday, April 28, 2019, in Poway, Calif. A man opened fire Saturday inside the synagogue near San Diego as worshippers celebrated the last day of a major Jewish holiday. (AP Photo/Denis Poroy)
Now playing
03:08
California synagogue attack latest in hate-filled pattern
Biden 03062021
PHOTO: CNN
Biden 03062021
Now playing
02:28
'Help is on the way': Biden speaks after Senate passes relief plan
Sen. Lisa Murkowski (R-AK) asks a question at a hearing of the Senate Health, Education, Labor and Pensions Committee on September 23, 2020 in Washington, DC.
PHOTO: Alex Edelman/Pool/Getty Images
Sen. Lisa Murkowski (R-AK) asks a question at a hearing of the Senate Health, Education, Labor and Pensions Committee on September 23, 2020 in Washington, DC.
Now playing
01:40
Trump plans to campaign against Sen. Murkowski in 2022
01 senate stimulus bill 210306
PHOTO: Senate TV
01 senate stimulus bill 210306
Now playing
01:47
Senate passes Biden's $1.9 trillion Covid-19 relief bill
Pope Francis meets with Iraq's leading Shiite cleric, Grand Ayatollah Ali al-Sistani in Najaf, Iraq, Saturday, March 6, 2021. The closed-door meeting was expected to touch on issues plaguing Iraq's Christian minority. Al-Sistani is a deeply revered figure in Shiite-majority Iraq and and his opinions on religious matters are sought by Shiites worldwide.
PHOTO: Vatican Media/AP
Pope Francis meets with Iraq's leading Shiite cleric, Grand Ayatollah Ali al-Sistani in Najaf, Iraq, Saturday, March 6, 2021. The closed-door meeting was expected to touch on issues plaguing Iraq's Christian minority. Al-Sistani is a deeply revered figure in Shiite-majority Iraq and and his opinions on religious matters are sought by Shiites worldwide.
Now playing
01:42
Pope Francis holds historic meeting with revered Shia cleric
WASHINGTON, DC - MARCH 05: Sen. John Cornyn (R) (R-TX) talks with Sen. Joe Manchin (D-WV) while walking to the U.S. Senate chamber for a vote March 05, 2021 in Washington, DC. The Senate continues to debate the latest COVID-19 relief bill.  (Photo by Win McNamee/Getty Images)
PHOTO: Win McNamee/Getty Images
WASHINGTON, DC - MARCH 05: Sen. John Cornyn (R) (R-TX) talks with Sen. Joe Manchin (D-WV) while walking to the U.S. Senate chamber for a vote March 05, 2021 in Washington, DC. The Senate continues to debate the latest COVID-19 relief bill. (Photo by Win McNamee/Getty Images)
Now playing
02:54
Axelrod breaks down Manchin's surprising move
sinema
PHOTO: CNN
sinema
Now playing
01:50
Senator's move has many on the internet outraged
PHOTO: FBI
Now playing
02:58
Trump State Department official charged in Capitol riot
John King Magic Wall 0305
PHOTO: CNN
John King Magic Wall 0305
Now playing
02:17
President Biden sending a team to the US-Mexico border
PHOTO: CNN
Now playing
02:53
Here's how Canadian schools have stayed open
This image was taken during the first drive of NASA's Perseverance rover on Mars on March 4, 2021. The team has spent the weeks since landing checking out the rover to prepare for surface operations.
PHOTO: JPL-Caltech/NASA
This image was taken during the first drive of NASA's Perseverance rover on Mars on March 4, 2021. The team has spent the weeks since landing checking out the rover to prepare for surface operations.
Now playing
02:17
NASA releases stunning new images from Mars
Rep john garamendi 0305
PHOTO: CNN
Rep john garamendi 0305
Now playing
02:33
Rep. Garamendi: Any lawmaker involved in Capitol riots ought to be thrown out of Congress
A view of Capitol Hill during heightened security concerns over possible protests or violence tomorrow March 3, 2021, in Washington, DC. - Washington's security posture has been bolstered after threats of a possible March 4, 2021, "breach" of the US Capitol, with the House of Representatives changing its voting plans to avoid gathering members on a day of potential unrest. (Photo by Brendan Smialowski / AFP) (Photo by BRENDAN SMIALOWSKI/AFP via Getty Images)
PHOTO: Brendan Smialowski/AFP/Getty Images
A view of Capitol Hill during heightened security concerns over possible protests or violence tomorrow March 3, 2021, in Washington, DC. - Washington's security posture has been bolstered after threats of a possible March 4, 2021, "breach" of the US Capitol, with the House of Representatives changing its voting plans to avoid gathering members on a day of potential unrest. (Photo by Brendan Smialowski / AFP) (Photo by BRENDAN SMIALOWSKI/AFP via Getty Images)
Now playing
03:18
Rep. Sarbanes: Failure to pass HR 1 'would split our democracy in two'
Senior Advisor to the President Jared Kushner  attends a press conference on September 4, 2020, in the Brady Briefing Room of the White House in Washington, DC. (Photo by Brendan Smialowski / AFP) (Photo by BRENDAN SMIALOWSKI/AFP via Getty Images)
PHOTO: BRENDAN SMIALOWSKI/AFP/AFP via Getty Images
Senior Advisor to the President Jared Kushner attends a press conference on September 4, 2020, in the Brady Briefing Room of the White House in Washington, DC. (Photo by Brendan Smialowski / AFP) (Photo by BRENDAN SMIALOWSKI/AFP via Getty Images)
Now playing
02:50
Jared Kushner disappears from Trump's inner circle
PHOTO: CBS Evening News with Norah O'Donnell
Now playing
02:14
Governor Cuomo accuser Charlotte Bennett speaks out
In this Dec. 1, 2020 file photo, Chairman of the Federal Reserve Jerome Powell appears before the Senate Banking Committee on Capitol Hill in Washington.  Powell told Congress on Wednesday, Feb. 24, 2021,  that the central bank will not begin raising interest rates until the Fed believes it has reached its goals on maximum employment  and warned that many people in the hardest hit industries will likely need to find different jobs.  (AP Photo/Susan Walsh, Pool, File)
PHOTO: Susan Walsh/AP
In this Dec. 1, 2020 file photo, Chairman of the Federal Reserve Jerome Powell appears before the Senate Banking Committee on Capitol Hill in Washington. Powell told Congress on Wednesday, Feb. 24, 2021, that the central bank will not begin raising interest rates until the Fed believes it has reached its goals on maximum employment and warned that many people in the hardest hit industries will likely need to find different jobs. (AP Photo/Susan Walsh, Pool, File)
Now playing
02:18
Jerome Powell: US economy 'some time' away from full recovery
A customer wears a face mask while shopping for flowers displayed for sale from a wholesale merchant ahead of the Valentine's Day holiday at the Southern California Flower Market on February 12, 2021 in Los Angeles, California. - While some florists note an increased demand for socially distant gifts, the Covid-19 pandemic has impacted global supply chains and shut down most large events including weddings where flowers are popular. The Valentine's Day and Mother's Day holidays are historically the two busiest days of the year for floral businesses. (Photo by Patrick T. FALLON / AFP) (Photo by PATRICK T. FALLON/AFP via Getty Images)
PHOTO: Patrick T. Fallon/AFP
A customer wears a face mask while shopping for flowers displayed for sale from a wholesale merchant ahead of the Valentine's Day holiday at the Southern California Flower Market on February 12, 2021 in Los Angeles, California. - While some florists note an increased demand for socially distant gifts, the Covid-19 pandemic has impacted global supply chains and shut down most large events including weddings where flowers are popular. The Valentine's Day and Mother's Day holidays are historically the two busiest days of the year for floral businesses. (Photo by Patrick T. FALLON / AFP) (Photo by PATRICK T. FALLON/AFP via Getty Images)
Now playing
02:39
States rolling back Covid-19 safety measures as cases continue to rise
(CNN) —  

John T. Earnest, the accused synagogue shooter, may have summed it up best himself.

“If you told me even 6 months ago that I would do this I would have been surprised,” he allegedly wrote in an online manifesto before last weekend’s attack on the Chabad synagogue near San Diego.

On Tuesday, Earnest entered a not guilty plea in court. Wearing glasses and dark blue jail-issued clothes, the 19-year-old was assigned a public defender as he faces one count of murder, a count of arson of a house of worship and three counts of attempted murder.

He will be held without bail while investigators, family and friends continue to piece together Earnest’s baffling, and seemingly sudden, departure from the world he once knew.

How, and when, they wonder, did the piano playing, academic overachiever from a churchgoing family of lifeguards, go so wrong?

“How our son was attracted to such darkness is a terrifying mystery to us,” Earnest’s family wrote in a statement released this week. They said their son’s “actions were informed by people we do not know, and ideas we do not hold.”

Former classmates also say they were perplexed by the turn of events. The Earnest in court Tuesday is unrecognizable from the high school boy they knew two years ago.

Back then he was known as the guy who was so smart that he didn’t bother to take notes in advanced chemistry and physics, but still aced every exam; so quiet that some teachers were startled when he spoke.

“I walked the same hallways as this guy, read the same textbooks, drove around the same areas, and essentially had the same upbringing,” one student posted on the online forum Reddit, “but he became a murderer?”

CNN interviewed the student and confirmed she was the author of the post.

According to law enforcement officials, Earnest used an “AR-type assault weapon” to shoot the victims. Prosecutors told a judge Tuesday that Earnest donned a tactical vest and helmet during the attack and had extra magazines of ammunition with him. The shooting, they said, was captured on video and abruptly ended when either his gun jammed or he was unable to reload. He fled the scene and called 911 on himself, making statements about the incident that San Diego District Attorney Summer Stephan described as “consistent with the charges.”

Stephan did not say how or when Earnest acquired the weapon, but that the investigation “so far indicates that he obtained the gun legally.” A new law that took effect in California earlier this year requires gun purchasers to be at least 21 years old under most circumstances. One exception, Stephan noted, was if the weapon was purchased by someone with a hunting license. She would not confirm whether that was how Earnest acquired the gun.

Stephan said prosecutors have not decided whether to seek the death penalty against Earnest, who was pursuing a nursing degree at California State University at San Marcos before the shooting.

In the online manifesto, Earnest allegedly wrote he was inspired by an attacker who killed scores of people at a New Zealand mosque and Islamic center on March 15. The teen said he conceived of and executed his own assault within a month. The assault on the synagogue was April 27.

The manifesto reflects a long-simmering, extreme hatred of Jews. His expletive-filled rant refers to Jews as degenerative, genocidal, ugly, cursed and corrupt. He blames the Jews for a multitude of what he considers societal problems, from communism to pornography. He added bigoted and racist comments about many other ethnicities, religions and races.

Earnest brags of what he calls his European ancestry – his “magnificent bloodline.” He claims that his violence is condoned by his Christianity. He rails against law enforcement. He lists Adolf Hitler as one of his inspirations.

The teenager’s family said they were disgusted by his actions, writing in their statement, “He has killed and injured the faithful who were gathered in a sacred place on a sacred day. To our great shame, he is now part of the history of evil that has been perpetrated on Jewish people for centuries.”

Earnest’s purported words and actions are in stark contrast to the clean-cut looking student featured on a Facebook page for Mt. Carmel High School’s Fraternity of Academic and Civic Excellence.

He is dressed in a blue suit and red tie, arms folded, smile beaming. Next to him is a bio describing his 4.31 GPA, membership on the varsity swim team, prowess in piano and first, second and third-place showings in the school talent show.

Francis “Sonny” Pizzo, who graduated from Mt. Carmel High School with Earnest in 2017, said he did not know Earnest well, but recalled him as “a quiet person, not very outspoken.”

Pizzo said he was known for his musical talent, but that he did not seem particularly social.

“He didn’t bring attention to himself,” Pizzo said.

A fellow student who posted about the attack on Reddit said she felt physically ill for hours after learning that Earnest, who she said friends called “Johnny,” was responsible.

She recalled how Earnest would sit in class, listening to music, “both hands shoved into his jeans pockets … and still managed to ace every exam and quiz.”

CNN reached out to the author of the post and confirmed her identity as a student at Mt. Carmel High School. She said school officials have discouraged students from speaking with the media and asked that she not be identified by name. She said she was friends with a member of the Earnest family and thought very highly of them.

In an interview, the student said she was struck by the contrast between Earnest’s alleged online bluster and his in-person demeanor.

“He seemed very outspoken in that post,” she said. “But in real life he doesn’t talk.”

The only exception, she said, was that he had a reputation for sometimes airing conservative views in a government class.

“He didn’t really reveal himself to be a radical individual at the time,” she said. “He was off the radar.”

The student, who said she also held conservative views on topics including immigration, taxes and abortion, said they were not popular positions with most fellow students.

“Conservatives have it rough here,” she said. “They don’t respect our opinion.”

In her Reddit post, she said she could not begin to understand what prompted him to carry out the attack, which she called “the worst crime that any mortal can commit.”

Another student who posted online about the attack called it “horrific and reprehensible” and said she was “deeply upset” for the victims.

But she also wrote that she felt anguish for the family of the shooter, particularly his father, who was also her physics teacher at Mt. Carmel.

She said she and other students were with the elder Earnest, also named John, on the morning of the shooting for an Advanced Placement exam preparation session he was leading.

“I can vividly remember seeing the smile on his face yesterday morning with a batch of cookies he had baked for us,” she wrote. “For each student that came to the review, he had prepared by hand [a] special binder with review for our upcoming exam. This was one of countless ways Mr. Earnest went above and beyond for his students.”

CNN contacted the author of the post and confirmed that she was a student at Mt. Carmel High School. She, too, asked not to be identified due to the sensitive nature of the subject.

She wrote in the post that she is close friends with other members of the Earnest family and knows they had no hand in what John Earnest is accused of doing.

“There may be many reasons why he got radicalized but one thing is for sure, his family is not the reason,” she wrote. “It is unbearable to see such a tragedy affect their family this way.”

District Attorney Stephan was asked at a news conference Tuesday whether Earnest’s family had any knowledge of his extreme views.

She declined to say what the family may have known but added: “Many times families don’t see things happening.”

Curt Devine and Audrey Ash contributed to this report.