Attempts to prosecute members of Argentina's former military junta have got mired in legal confusion, with courts issuing seemingly contradictory orders relating to long-standing amnesty laws.
Some 80 military officers are being investigated over past rights abuses
In one decision, a judge in Buenos Aires ordered the release of 40 former officials who had been detained on a Spanish international arrest warrant.
The ruling came after Spain - which had been trying to prosecute them for human rights abuses against Spanish nationals - on Friday decided to drop its extradition request.
But another court reopened investigations into alleged offences by nearly 80 members of the junta that ruled Argentina between 1976 and 1983.
This is the latest challenge to amnesty laws that have shielded them from prosecution and which were recently overturned by the Argentine Congress.
Military officers accused of murder or torture during the "Dirty War" had previously been protected from the courts.
Those due to be released include 39 military officers and one civilian.
Among them is former naval captain Alfredo Astiz, known as the Blond Angel of Death. He was sentenced by French courts in absentia to life imprisonment in 1990 for the murder of two French nuns.
"I have placed them at immediate liberty unless another court orders their detention. The case has been shelved," Judge Rodolfo Canicoba Corral said.
The former military dictators Jorge Videla and Emilio Massera are not among those due for release. They have been accused of
kidnapping the children of political opponents who were tortured to death.
Spain says it dropped its extradition request because Argentina now has laws in place to try the men in their own courts.
But Astiz and the other officials due for release may be re-arrested, as a result of the other court ruling.
They are subject to a new investigation into human rights abuses committed at the notorious Navy School of Mechanics.
Legal analysts say the seemingly contradictory decisions reflect confusion over the status of two 1980s-era amnesty laws.
The laws have blocked previous attempts to prosecute officers from the former military government, accused of killing up to 30,000 people.
Most analysts believe only the Supreme Court can definitively declare the laws void and pave the way for new trials.
"This is chaos," said Gregorio Badeni, a constitutional
"Until the Supreme Court makes a ruling, there will be great confusion. You're going to have different courts making different interpretations of the amnesty laws."
Efforts to prosecute Argentina's past human rights abuses have been boosted under new President Nestor Kirchner, who took office in May promising to put "an end to impunity".