Argentina's ex-president Mauricio Macri was charged Wednesday with ordering the illegal surveillance, as head of state, of relatives of 44 sailors who died when a navy submarine sank in 2017.

Judge Martin Bava issued an indictment against the 62-year-old, now the country's right-wing opposition leader, for "the offense of carrying out prohibited intelligence actions."

He is also charged with "creating conditions for data of persons to be collected, stored and used," according to the 174-page ruling.

Macri, who was president from 2015 to 2019, risks between three and 10 years in jail for allegedly violating Argentina's intelligence laws.

At a preliminary court appearance earlier this month, the former president submitted a written statement in which he insisted: "I did not spy on anyone, I never ordered (anyone) in my government to spy on anyone."

On Wednesday, he denounced the charges, telling reporters during a visit to Chile: "I have said all along that this was political persecution that would end this way."

The ARA San Juan submarine disappeared in November 2017.

Argentina's former president Mauricio Macri has been charged in connection with claims he ordered illegal surveillance of relatives of sailors killed in a submarine accident in 2017 Argentina's former president Mauricio Macri has been charged in connection with claims he ordered illegal surveillance of relatives of sailors killed in a submarine accident in 2017 Photo: AFP / JUAN MABROMATA

When it was found just over a year later, it was at a depth of more than 900 meters (2,950 feet) in a remote area of the South Atlantic, some 400 kilometers off the coast of Argentina.

It had been crushed from an implosion apparently caused by a technical fault. Authorities decided against attempting to refloat it.

Family members of the 44 crew members told investigators they were followed, wiretapped, filmed and intimidated into abandoning any claims related to the incident.

"The significance of the information gathered, the intention behind it, and the systematic nature of the documents analyzed in this case allow us to state that this illegal intelligence was put together for one person: Mauricio Macri," Bava wrote.

Macri was granted bail of 100 million pesos (about $990,000) by the judge, but is banned from leaving the country.

Macri had asked for the case to be thrown out on the grounds that the court did not have the authority to lift secrecy provisions on state intelligence to allow him to testify, but that request was rejected.

He claimed he was the victim of political persecution during campaigning for November 14 legislative elections in which Macri's Together for Change alliance ended up being the big winner.

A judge had earlier ordered the prosecution of secret service heads Gustavo Arribas and Silvia Majdalani, who reported to Macri at the time.

So far, 12 people have been charged in connection with the case.