The Peruvian government has recalled its ambassador to Chile over allegations of military espionage.
The Peruvian foreign ministry said its ambassador would not return to Santiago until Chile gave assurances that the incident would not be repeated.
Peru said last month it had evidence that three members of its navy had received money from Chile to pass on confidential information.
The Chilean government says it does not engage in espionage at home or abroad.
In her Twitter account, Peruvian Prime Minister Ana Jara urged Chile to release details of an internal investigation it is carrying out.
"Until we get an explanation on the incident, we will withdraw our ambassador to Chile," she wrote.
Chile said it would continue to maintain a sober attitude towards the incident.
"We are not going to make any comments on the latest diplomatic notes because their content is confidential," said Chilean Foreign Minister Heraldo Munoz.
"We respect this decision [to withdraw the ambassador], which is in the sphere of competence of the Peruvian authorities," he added.
The two South American nations have a long history of border disputes.
Chile won the War of the Pacific, which lasted from 1879 to 1883, and has kept vast areas claimed by Peru and Bolivia.
In the 1970s Chile planted thousands of mines along its northern border during a period of tension with Peru.
Last year, the United Nations' highest court defined the maritime boundary between Peru and Chile after an acrimonious dispute over a 1950s agreement.
Judges at International Court of Justice (ICJ) awarded Peru parts of the Pacific Ocean but kept rich fishing grounds in Chilean hands.