A Brazilian bishop resigned days after a video purportedly showing him masturbating went viral.

Pope Francis accepted the resignation of Bishop Tomé Ferreira da Silva, who oversaw a diocese in Sao Paulo state, Sao Jose do Rio Preto, on Wednesday, August 18.

According to reports, Bishop Tome has been under investigation by the Vatican since 2015 for allegedly ignoring reports of sexual abuse in his diocese.

The Vatican, the Brazilian bishops’ conference, and Ferreira’s home diocese all announced the resignation but did not specify whether the bishop in the video was the one who resigned.

The person in the video resembles Ferreira, and according to the local newspaper Diario da Regiao, Ferreira confirmed it is his image in a brief interview, without providing any further details.

According to the local news network Globo, the Sao Jose do Rio Preto diocese is the subject of a Vatican investigation into whether Ferreira ignored reports of abuse and exchanged sexual messages with an adolescent.

He cited personal reasons for resigning as regional coordinator of the Ribeirao Preto archdiocese, which includes Sao Jose do Rio Preto and where he remained bishop, at the time.

In 2015, he was accused of stealing money from a church and giving it to his driver, with whom he allegedly had a romantic relationship.

At the time, the Vatican reportedly launched an investigation, and he denied the allegations.

The pope on Wednesday named as his temporary replacement Archbishop Moacir Silva of Ribeirao Preto.