Two years after his release from prison, Rabbi Yoshiyahu Pinto has been sworn in as the chief rabbinical judge in Morocco.

Pinto was officially sworn in at Casablanca’s main synagogue in a Saturday night ceremony attended by hundreds of people, including representatives of the Moroccan government.

In his new role, which was approved by the king of Morocco, Pinto will also serve as the country’s chief kashrut supervisor.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

At the ceremony, Pinto vowed to the small Jewish community in the Muslim-majority nation that they would “embark on a new path” under his leadership and thanked King Mohammed VI for his support.

In his remarks, Pinto also briefly addressed his one-year stint in prison in Israel, saying only that “God was testing me during that time.”

Rabat: Photo, In an elaborate ceremony, Rabbi Yoshiyahu Yosef Pinto was crowned last tonight by representatives of the King of Morocco to become the Chief Rabbi of the Muslim State, Jewish and Muslim leaders jointly celebrated appointment pic.twitter.com/5pHwZdxgTg — Yiddish News (@YiddishNews) April 14, 2019

Pinto, a kabbalist with a sizable and influential international following, moved to Morocco shortly after his release from prison in Israel in early 2017. He was sentenced for bribing a senior police official in 2014.

After reporting Pinto’s bribe to his superior, Brig. Gen. Ephraim Bracha became the victim of an extended defamation campaign orchestrated by Pinto’s followers. Bracha committed suicide in July 2015, after the case became public. His body was found hours before the Justice Ministry cleared him of wrongdoing in the case.

Pinto eventually signed a plea bargain with prosecutors that saw him testify against Menashe Arviv, the former head of the police anti-corruption unit, who was suspected of receiving benefits from Pinto’s associates.

The popular rabbi, who heads several charity organizations and Torah study institutions in Israel and in the US, has also been the subject of a number of investigations by the FBI since 2011.

Pinto — whose followers include Jay Schottenstein, chairman of the American Eagle Outfitters clothing company, and Israeli real estate mogul Jacky Ben-Zaken — was suspected of embezzlement of funds from one of his charitable funds, but charges were never brought against him.

In 2014, US federal prosecutors brought charges against Republican US Congressman Michael Grimm for receiving large contributions from followers of Pinto. Grimm later acknowledged receiving $250,000-$300,000 in contributions from followers of the rabbi.