The Peruvian army says it has rescued 39 people from a farm where the Shining Path rebel group kept them as slaves.
Some of the captives said they had been kidnapped some 30 years ago. The defence ministry said 26 of them were children, some of whom were born in captivity.
The victims said they were forced to work in fields.
Some 120 Peruvian soldiers took part in the operation, with four army helicopters airlifted the captives into safety.
The military says soldiers were led to the farm by a former captive, who lived there for many years and escaped about a month ago.
'Work and procreate'
"We've been here, like this, for 30 years," one of the rescued women told La Republica newspaper.
Some of the rescued children said they were scared of the army, after being told by the rebels that the soldiers had come to kill them.
"The aim of this operation was to rescue the people who were hostages of the Shining Path (Sendero Luminoso) in what is called a production camp," said Vice-Defence Minister Ivan Vega Loncharich.
Production camps are farms where "the children are gathered to work in agriculture and the women are expected to procreate and give birth to new rebels," he said.
La Republica said some of the children had been kidnapped from rural communities, where parents do not report abductions for fear of reprisals.
The Maoist-inspired left-wing group was largely defeated in the 1990s after waging a bloody insurgency in one of South America's poorest nations.
Almost 70,000 people died or disappeared in more than a decade of internal conflict.
But the Shining Path remains active in the main cocaine producing region of the country, where it is lead by the brothers Victor and Jorge Quispe Palomino.
They have been indicted in the US for drug trafficking offences, along with Florindo Eleuterio Flores Hala, alias Comrade Artemio, who was arrested in 2012.