The man accused in a deadly shooting at a Poway synagogue on the last day of Passover is also accused of setting fire to a mosque in Escondido last month, according to the charging documents filed Monday.

San Diego County Sheriff Bill Gore confirmed that the suspect in the Poway synagogue shooting was 19-year-old John T. Earnest from San Diego.

He was expected to be arraigned Tuesday on one count of murder with a hate-crime special circumstance and gun allegations, three counts of attempted murder with hate-crime and gun allegations and one count of arson of a house of worship, according to the San Diego County District Attorney's Office.

The arson charge is tied to the March 23 fire at Dar-ul-Arqam on W. Sixth Avenue that occurred before early morning prayer.

The mosque’s security camera spotted an unidentifiable person breaking a lock to a parking lot gate and then pouring a flammable liquid near a side door and setting it on fire.

Police said the suspect left a message in graffiti in the mosque’s parking lot. EPD did not reveal what the graffiti said, only noting that it referenced the New Zealand shooting that happened the week before.

The synagogue shooting and the mosque arson were less than 9 miles apart.

According to a manifesto, published online shortly after 10 a.m. PST on Saturday, Earnest took responsibility for the Escondido mosque arson.

Earnest does not have a criminal history and has no apparent connection with white supremacist groups, according to San Diego County Sheriff Bill Gore.

"There is no indication at this point in the investigation that Earnest was part of an organized group. We believe he acted alone and without outside support in carrying out the attack," deputies said in a statement.

NBC 7 has learned Earnest was a graduate of Mount Carmel High School and nursing student at Cal State San Marcos, where he was on the swim team.

In the manifesto, Earnest states he was attending nursing school but did not specify the exact location. On 8chan, a far-right message board website, a user identified as Earnest said he planned to livestream the shooting on Facebook but the Facebook account he linked to has since been deactivated.

Filled with racist rants and quotes from the Bible, Earnest praises the suspects responsible for the New Zealand mosque and Pittsburgh synagogue shootings and adds they were his inspiration for the planned shooting in Poway.