The leading Kabbalist in the world is going to jail.

Rabbi Yoshiyahu Yosef Pinto is a celebrity in Israel and among financial and real estate elites in New York. A sage whose followers include the leaders of Israel’s business elite, Pinto is the descendant of Moroccan Jewish saints, a Sephardic hero, and a master of Kabbalah, the ancient tradition of Jewish mysticism and magic. His net worth has been estimated at $19 million, not including the vast sums under the control of his various nonprofit organizations.

He is also a felon, convicted of bribing an Israeli police general. This week, after exhausting what is probably his last appeal—a last-ditch effort to avoid jail for health reasons—it appears he is finally headed for prison.

Adding insult to injury, a $30 million defamation suit the rabbi’s organization filed against a reporter was dismissed by a New York court this week for lack of jurisdiction.

How does a Kabbalist, who by all accounts is indeed a devout man who practices what he preaches, become a multimillionaire?

It’s the network. In New York, Pinto’s close followers include leading Jewish real estate magnates like Ofer Yardeni and Charlie Kushner, politicians like Anthony Weiner and Eric Cantor, Jewish leaders including celebrity rabbi Marc Schneier and Malcolm Hoenlein (the head of the Conference of Presidents of American Jewish Organizations), and even LeBron James.

Followers believe that Pinto has supernormal powers. Many said he can read minds. Others say he has the ability to bless everything from business ventures to political careers—and to curse enemies as well. Like other Kabbalists, Pinto speaks only Hebrew, is soft spoken, and keeps his eyes partly closed, the better to detach from worldly concerns. He dispenses advice, blessings, and amulets. He is the descendant both of the famous Moroccan mystic Rabbi Yisrael Abuhatzeira, also known as the Baba Sali, and of Rabbi Haim Pinto, one of Morocco’s most powerful rabbis. And he welcomes everyone: religious, secular, Jewish, non-Jewish.

But for a holy man, Pinto is surrounded by shady criminal elements, including outright crooks. In Israel, these include Yossi Harari, the head of the Ramat Amidar underworld gang, and mobster Shalom Domrani.

In the United States, they include Michael Grimm, the former Staten Island congressman convicted of tax evasion and perjury. Pinto was not directly implicated in Grimm’s crimes, but his close associates were; allegedly, they solicited donations for Grimm’s election campaign from Pinto’s network of followers in excess of legally allowable amounts.

There were also dubious characters within Pinto’s own organization. In 2011, The Jewish Daily Forward discovered that a top aide, Ben Zion Suky, had been a pornographer. Then they broke the news that Pinto’s Israeli charity “had spent tens of thousands on a high-end hotel, fine men’s clothing and jewelry, among other luxuries.”

But as described in a 2014 expose by New York Magazine, the empire really began falling apart in 2011, when Pinto’s former aide, Ofer Biton, began to turn against him, with the help of high-flying publicist Ronn Torossian. Torossian threatened Pinto’s organization with a negative PR blitz, and then began to carry it out. Biton extorted cash. Eventually, both Pinto and Biton were working as informants.

Meanwhile, Israeli authorities started investigating Pinto’s charities for misappropriation of funds, eventually arresting 10 employees. That’s when Pinto’s wife passed envelopes full of cash to the wife of police Brig. Gen. Ephraim Bracha, who had been a follower, in the hopes that Bracha would block the investigation. Unbeknownst to Pinto, Bracha was actually part of it.

Facing years in prison, Pinto took a plea deal last spring, and on May 12, he received the lightest sentence permissible under law: one year plus a fine. One month later, Bracha, who had been hounded by Pinto’s followers, committed suicide.

But Pinto fled to New York, pleading ill health. At the end of October, his organization proffered a weird, error-filled letter from a urologist, urging that the rabbi not fly back to Israel, even though the rabbi “insists” upon doing so. Followers assaulted reporters covering the case, and made threats to witnesses who had testified. But Pinto was sent back.

And now his last appeal to the Israeli Supreme Court has been rejected; the Court said that Israeli prisons can provide whatever medical care the 43-year-old rabbi needs.

As reported by the Jewish Daily Forward, Rabbi Pinto has framed his troubles in theological, cosmological terms. Last summer, he told followers: “We are playing our part in a widespread battle, a holy war.” And in a July 22 email, he said that he hoped “that whoever was involved in this will… come clean… thus will prevent great suffering upon all the living and the dead.”

It would be a mistake, though, to lump Pinto in with corrupt televangelists, sex-offending priests, and other wayward clerics. Pinto was responsible for the bribes—that is now a matter of law—but he didn’t give them personally. And Pinto’s organization clearly is filled with unsavory characters—but the rabbi himself appears to lead a modest lifestyle, despite his great wealth.

All this makes the rabbi something of an enigma. It’s possible that he is a cynical Svengali, a manipulator pulling the strings of power and confusing the credulous. Maybe the piety and the mysticism are all an act.

At the other extreme, maybe Pinto really is a pious, unworldly figure possessed of spiritual gifts but surrounded by men who take advantage of his naiveté. That’s probably not right either—but most likely, the truth lies somewhere in between.

Pinto’s charities have spent millions of dollars on social services, and lavished hundreds of thousands on luxuries for staff. Pinto himself is a mystical sage and a canny operator. As the Kabbalah itself teaches, the good is mixed in with the bad.

Which is how a mystical rabbi can also be headed for jail.