The head of Colombia's army has quit amid a scandal in which superiors allegedly abused young recruits.
Gen Castellanos became army chief in 2004
Gen Reinaldo Castellanos resigned after a magazine printed photos of 21 soldiers apparently being tortured at a base in the eastern town of Piedras.
Gen Castellanos had said earlier he was ashamed of the allegations and that those responsible would be punished.
President Alvaro Uribe has named Gen Mario Montoya, commander of a Caribbean division, as his replacement.
Correspondents say although Gen Castellanos, 55, immediately criticised his officers, his position had become untenable.
In its Sunday edition, the weekly magazine Semana said the soldiers were branded like cattle, sexually abused, or forced to eat animal faeces.
It said the victims were 18 years old and came from poor families.
The army has long been fighting left-wing guerrillas
The abuses at the training centre in Piedras, 95km (60 miles) west of the capital, Bogota, allegedly took place in late January or early February.
President Uribe quickly condemned the alleged torture, saying it was "deplorable that the army, in this crucial moment in our country's history, has engaged in such painful and very serious misconduct".
The president was also critical of the army for making the allegations public only a few hours before the magazine came out.
The detention of four officers has been ordered. Several others have already been interviewed in order to determine their possible role in the incident.
The allegations come at a time when the Colombian army has been trying to improve its poor reputation on human rights.
In an interview with El Tiempo newspaper, Gen Castellanos had acknowledged previous abuses at other military units, but said they were "isolated" incidents.
The army has been fighting left-wing guerrillas for more than four decades.
Human rights groups say that, in the past, the military has been tainted by collusion with right-wing paramilitary forces.