President Ollanta Humala criticized Friday's decision and his justice minister, Juan Jimenez, called it "an embarrassment for the country."
The court's decision, which is not subject to appeal, reduced the sentence for Montesinos from 25 to 20 years. The panel also ordered former military intelligence chief Alberto Pinto freed immediately. He had been sentenced to 15 years in 2010.
The court ruled that the killings, including of an 8-year-old boy, did not amount to crimes against humanity but rather murders.