The madman who last month perpetrated the mass shooting at a New Zealand mosque inspired the shooter in Saturday’s deadly attack in a San Diego-area synagogue, according to a manifesto published under the same name as the suspect, John T. Earnest.

Brenton “Tarrant was a catalyst for me personally. He showed me that it could be done. And that it needed to be done,” the document reads, referencing the man who allegedly shot and killed 50 Muslims on March 15.

Law enforcement sources named the suspect in Saturday’s deadly shooting at Chabad of Poway synagogue as Earnest, 19, according to NBC News. At least one worshipper was killed and three others were wounded as the congregation celebrated the last night of Passover.

In the document uploaded to pastebin.com Saturday, the author states he was a nursing student.

“To my family and friends. I can already hear your voices. ‘How could you throw your life away?’” the manifesto reads. “What value does my life have compared to the entirety of the European race?” the document continues, before launching into an anti-Semitic tirade.

The attack came exactly six months to the day that 11 people were massacred at the Tree of Life synagogue in Pittsburgh — the deadliest attack on Jews in US history. Referencing the killer in that shooting, that manifesto states, “It’s a shame that Robert Bowers especially got such a bad rap.”

The author of the manifesto claims he “scorched a mosque” in nearby Escondido, Calif.

A man who answered the phone at an address listed for Earnest’s father declined to comment Saturday.

“I understand your desires and all, but right now I have no comment to make,” he told The Post.