One woman died, and three were hospitalized after a shooting at a synagogue in Poway, CA, outside San Diego.

San Diego County Sheriff William Gore said at a news conference that a 19-year-old white man, identified as John Earnest, had entered Chabad of Poway on Saturday, April 27, and opened fire on worshippers with an AR-type assault weapon, which he had purchased legally the previous day from a San Diego dealer. Earnest was later taken into custody by a California Highway Patrol officer who heard about the incident on a police scanner, saw the suspect in his car, and apprehended him. Earnest told police he had done it “to defend the nation” from the Jewish people, according to an AP report.

John T. Earnest has been charged with one count of first-degree murder and three counts of attempted murder, the San Diego Sheriff’s Department said.

The shooting came exactly six months after a shooting at a Pittsburgh synagogue killed 11 people in the deadliest attack on Jews in U.S. history. A truck driver who authorities say expressed hatred of Jews has been charged in the Oct. 27 rampage at the Tree of Life synagogue in Pittsburgh. He pleaded not guilty.