A Chilean judge has ruled Peru's former President Alberto Fujimori should not be extradited to Peru.
Alberto Fujimori was the president of Peru for 10 years
Mr Fujimori has been accused of human rights violations and corruption by Peru's prosecutors, but the judge said the evidence was not strong enough.
Peru's government immediately said it would appeal against the judge's decision, which also has to be confirmed by Chile's Supreme Court.
Mr Fujimori, the son of Japanese emigres to Peru, welcomed the decision.
He denies all the charges against him.
The judge, Orlando Alvarez, said the evidence presented by the Peruvian authorities was unconvincing.
On the most serious charges - of sanctioning extra-judicial killings, the judge said "it was not proved that Mr Fujimori ordered or had even the least knowledge beforehand of the killings".
President of Peru from 1990 to 2000, Mr Fujimori was praised for reviving the country's collapsing economy and curbing political violence.
But critics accuse him of crushing Peru's democratic institutions and committing human rights abuses.
A lawyer for Peru's government, Alfredo Etcheverry, expressed surprise at the decision.
"I do... think there has been a very regrettable administrative mistake, because it has manifested itself in a case this important and that had so much publicity," he said.
But Chilean President Michelle Bachelet said the ruling would not affect relations with Peru as the two countries were united "by an agenda of co-operation and mutual interest".
In 2000 Mr Fujimori became engulfed in a bribery scandal and fled to Japan, where he had been praised for his handling of a 1996-97 Japanese embassy hostage crisis.
Japan repeatedly refused efforts by the Peruvian government to extradite him on charges that included directing death squads, illegal phone tapping and corruption.
But in November 2005 he returned to Chile, hoping to launch a new bid for the Peruvian presidency in 2006 elections, only to be arrested on the request of the Peruvian authorities.
He recently announced his intention to run in this month's Japanese Senate elections, a move his critics said was a ploy to avoid extradition from Chile.