SAN DIEGO — Rabbi Yisroel Goldstein, who one year ago had part of his hand shot off in a deadly attack by a gunman at the Poway synagogue he founded and received an outpouring of support that included meeting President Trump, pleaded guilty Tuesday to federal charges of tax fraud and wire fraud.

Goldstein, 58, pleaded guilty to his role in a multimillion-dollar scheme where donors made large contributions to Chabad of Poway, but then secretly got most of the money back. Typically, Goldstein would keep a portion of the contribution — 10% — then funnel the remaining amount back to the donor, according to a charging document unsealed in San Diego federal court Tuesday.

The donor could then claim a large charitable contribution on his or her tax return, even though he or she had paid only a fraction of the claimed amount. The conspiracy netted at least $6.2 million in fraudulent donations from 12 taxpayers, resulting in tax losses to the IRS of at least $1.5 million, according to prosecutors.

Prosecutors say the charitable tax scheme was only one part of a more widespread effort to use the synagogue and its many connected nonprofits to illicitly raise funds and hide money.

Neither Goldstein nor his attorneys made any comments after the hearing in U.S. District Court. He is scheduled to be sentenced in October and faces a maximum of five years in prison but will probably get a lesser sentence. Five other people have pleaded guilty this week in connection with the case.

The U.S. attorney’s office said it will recommend probation when he is sentenced, based largely on his continuing cooperation, his contributions to the Jewish community and his role in advocating for peace after the deadly shooting. Goldstein has already forfeited $1 million in gold — part of an illicit charitable transaction — and has agreed to pay $2.5 million in restitution to the government and a private foundation for fraudulent grants.

The investigation into Chabad of Poway began about four years ago and involved a federal agent going undercover. Authorities served a search warrant on the synagogue on Oct. 17, 2018 — almost six months before the congregation was thrust into the national spotlight when a gunman burst into a Passover service and opened fire.

In the weeks and months that followed, Goldstein was celebrated in the news and in person, meeting Trump days after the shooting in the White House Rose Garden for the National Day of Prayer.

He spoke at the United Nations, at gatherings in Brazil and Poland, and at a University of San Diego forum on the rise of hate. He delivered a message of hope and optimism and became a global symbol against anti-Semitism and hate.

In November, citing exhaustion, Goldstein retired from the leadership of Chabad of Poway.