The teenage San Diego mosque gunmen appear to have left behind a shocking, hate-filled manifesto praising Adolf Hitler and a series of mass murderers before carrying out the attack, The California Post has learned.

Authorities are investigating whether 17-year-old Cain Clark and 19-year-old Caleb Vasquez wrote the nihilistic document before killing three people and then each other, according to law enforcement sources.

The manifesto espouses a desire to spark a race war and bring about the end of civilization.

The 75-page document is filled with Nazi iconography similar to that worn by Clark during a horrifying livestream of the attack, including the Black Sun — associated with Nazi SS leader Heinrich Himmler — and references to Atomwaffen, a violent neo-Nazi group. The text is a chaotic mix of anti-Trump, anti-liberal, antisemitic, homophobic, and misogynistic bile, unified only by the authors’ rage over feeling they had been denied more in life.

Sources said investigators have obtained a copy of the purported manifesto and believe it to be authentic.

Jennifer Du, who lives across the street from Clark’s $750,000 Southern California home, recalled seeing the 17-year-old the day before the shooting. “It’s been unreal. I saw him literally the day before. He just stood there,” Du, 30, told The California Post. “I didn’t know if he was watching me or something, but he just got food delivery and went back in.”

A next-door neighbor in San Diego described Clark’s family as normal and said the teen practiced martial arts. “As far as we knew he was very nice. They were a nice family,” said Marne, 85, who declined to provide her last name. “We were just flabbergasted,” she added. “We thought, ‘Oh my god,’ we couldn’t believe it.”

A section believed to have been written by Clark states that his views are neither left- nor right-wing, while expressing seething disdain for both sides. He claimed to align ideologically with Hitler and said he drew inspiration for the mosque attack from ideologically driven mass murderers including Ted Kaczynski, Timothy McVeigh, and Norwegian terrorist Anders Breivik.

Clark described the 2019 Christchurch mosque shooter in New Zealand as the blueprint for livestreaming the attack, which they hoped would be widely shared and inspire others to carry out similar strikes. He referred to the gunman as “Saint Terrant.”

The document contains a scattershot of derogatory and racist views targeting Muslims, Jews, gay people, and others. Clark described himself as an “accelerationist” who hoped to instigate an “all-out race war” to trigger the collapse of society.

In his portion, Vasquez lamented being short, saying it caused him great pain and humiliation.

Clark also wrote that he felt no remorse for his actions and stated that, had he survived, he would have let his lawyers handle everything. He denied carrying out the attack for fame, admitted he personally hated the victims and other cultures, and said he did not intend to survive.

Online profiles linked to Clark featured multiple Nazi slogans and images of Hitler and German soldiers in formation during World War II.

On Monday, Clark and Vasquez gunned down three people at the Islamic Center, including security guard and father of eight Amin Abdullah, who police say prevented more deaths. An online fundraiser for the slain hero has raised nearly $2 million in less than 24 hours. The other victims were identified as Nader Awad and Mansoor Kazziha, both members of the mosque.

At least one of the suspects took a weapon from his parents’ home and left a suicide note that talked about racial pride, a law enforcement source said. The livestream appeared to show Clark shooting Vasquez twice in the head before turning the gun on himself.

Police and the FBI are actively investigating the massacre and will be executing search warrants in the coming days, according to a source familiar with the case.