A judge in El Salvador has ordered a former attorney general freed, saying there is not sufficient evidence to detain him on charges that he divulged intercepted telephone conversations while prosecuting a Roman Catholic priest from Spain in 2014.

Judge Marta Rosales on Monday overturned a lower court's order to provisionally detain Luis Martinez. Rosales also ordered a new initial hearing for Martinez.

Martinez was attorney general in 2012-14 and was accused last month of using 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 gangs.