Twelve soldiers and seven civilians have been killed in a bomb attack by rebels in a remote coca-growing region of south-east Peru, the military said.
A military convoy was returning to base when a device hidden under one of the vehicles exploded. The survivors were then caught up in a gun battle, returning fire on the rebels for several hours.
The armed forces blame the Shining Path group, which wrought havoc in Peru during the 1980s and early 1990s. It is the worst attack in a decade by the Maoist-inspired organisation.
Peru's military command said women and children were among those killed and many more were injured during the attack in the Andes mountains, at Huancavelica province.
It came amid reports that Peru's army had launched an operation to remove 300 Shining Path rebels who work closely with cocaine traffickers in the region.
The BBC says the number of confrontations between the armed forces and the rebel groups, which the authorities call "narco-terrorists", is increasing.
In the 1980s and 1990s the guerrilla group attempted to impose a communist regime. Almost 70,000 people were killed during the violence.
However, the conflict has been largely dormant in recent years, and analysts say the Shining Path is a fraction of its former size.