SAN SALVADOR, El Salvador — A judge on Tuesday ordered that El Salvador’s former attorney general remain in jail on new charges that he divulged intercepted telephone conversations while prosecuting a Roman Catholic priest from Spain in 2014.

Luis Martinez, who was attorney general in 2012-14, used the calls against the Rev. Antonio Rodriguez, better known as “Father Tony.” Rodriguez was convicted of smuggling illicit items into prisons and having a relationship with the country’s gangs.

Rodriguez was sentenced to 30 months in prison, but was immediately released under a deal that prohibited him from visiting prisons or communicating with the gangs.

Martinez allegedly shared portions of intercepted phone calls with the country’s Catholic hierarchy.

On Tuesday, he declined to comment as he left court, but during the hearing referred to “perverse interests” in the country.

Rodriguez was a well-known figure in El Salvador, where he had worked for 15 years in many of the roughest neighborhoods to steer young men away from gangs. His critics called him the “gangster priest” and accused him of helping criminals get special treatment.

Martinez was originally arrested Aug. 22 for another case in which he is accused of helping a businessman in exchange for personal favors. He denied wrongdoing in that case.