Yale University has promised to return thousands of archaeological pieces taken from Machu Picchu nearly a century ago, Peru's president has said.
The relics from the 15th Century Inca citadel have been the focus of a bitter dispute lasting more than seven years.
Peru says the artefacts were lent in 1911 but never returned. It filed a lawsuit against the university in 2008.
The agreement comes after a concerted media campaign by Peruvian President Alan Garcia and his government.
Marches fronted by ministers and the president himself were staged in Lima and Cuzco. Mr Garcia even appealed directly to his US counterpart, Barack Obama, to intervene.
Earlier this month, the Metropolitan Museum of Art in New York returned to Egypt 19 artefacts found in the tomb of King Tutankhamun.
Peru says it loaned the university around 46,000 items which included mummies, ceramics and gold and bronze pieces, soon after Machu Picchu's official discovery by a Yale scholar, Hiram Bingham, in 1911.
But Yale says the number of pieces is far smaller and only 330 are suitable for display in a museum.
It says it returned boxes of artefacts more than 80 years ago.
Nonetheless talks between Peru and Yale seem to have gone well, with the university pledging to honour Peru's rich heritage by returning all the pieces in its possession, provided it can continue to study them.
Mr Garcia acknowledged that Yale's possession of the objects prevented them from being scattered among private collectors.
The artefacts are expected to be returned early next year in time for the centenary of what Peru calls the re-discovery of Machu Picchu.
The citadel is its top tourist attraction and most important archaeological site.