(CNN) -- Peru and Yale University have reached an agreement that will return a massive collection of pre-Columbian Inca artifacts to the South American country -- a settlement that could end a lengthy dispute over relics excavated nearly a century ago.
A high-level university representative pledged in a 90-minute meeting Friday to return the artifacts excavated from the ancient Inca ruins of Machu Picchu, Peruvian President Alan Garcia said.
"The Peruvian government is grateful for this decision and recognizes that Yale University conserved these parts and pieces that otherwise would have been dispersed in private collections throughout the world, and perhaps would have disappeared," Garcia said in a statement.
Yale also expressed its satisfaction that the disagreement may be over.
"Yale is very pleased with the positive developments in the discussions about the return of Machu Picchu artifacts to Peru," the university said in a statement Saturday. "It has always been Yale's desire to reach an agreement that honors Peru's rich history and cultural heritage and recognizes the world's interest in ongoing public and scholarly access to that heritage."
The controversy had taken on added heat recently, with Garcia asking U.S. President Barack Obama in June to help Peru regain custody of the artifacts. Thousands of Peruvians also demonstrated in several cities in June demanding the return of the collection.
Hopes had remained high in Peru, with Foreign Minister Jose Garcia Belaunde telling CNN two weeks ago that an agreement was expected soon.
The pieces would be returned at the beginning of 2011 -- in time for the country's celebration of the 100th anniversary of Machu Picchu's rediscovery, Garcia said.
The artifacts were excavated from the site by historian Hiram Bingham in 1912 during the first of several expeditions he led to Peru.
Bingham was an adjunct professor of Latin American history at Yale between 1907 and 1915. His collection of archaeological pieces, documents and photographs are housed at the university's Peabody Museum.
After they are returned to Peru, the relics would be handed over to San Antonio Abad del Cusco University, where investigators will continue studying them, Garcia said.
Peruvian officials have demanded their return for at least seven years and filed a civil lawsuit against the university in April 2009 in the U.S. District Court for the District of Columbia.
Garcia said he hashed out the deal Friday with former Mexican President Ernesto Zedillo, who directs the Yale Center for the Study of Globalization.
There are between 4,000 to 40,000 pieces, depending on how they are catalogued, said Yale University spokesman Tom Conroy. But only about 350 are museum quality pieces, he told CNN.
John Verano, an anthropologist from Tulane University, studied the skeletons in the Yale collection in 2000. Much of the Yale collection, he said, consists of shards and fragments, not complete objects that can easily be shown in a museum.
"The collection," he said, "is one of the most valuable Inca collections there is. In terms of beauty, though, the collection there is pretty junky. It's not museum quality."
The controversy over who has rights to the collection stems from Bingham's expeditions.
"There's some difference of opinion whether Hiram Bingham had a legitimate permit to export," Verano said.
Peruvian Foreign Minister Garcia Belaunde pointed out that a November 1916 letter from Bingham to the National Geographic Society, which funded the Peru expeditions, stated that the artifacts were on loan.
"Now they do not belong to us, but to the Peruvian government, who allowed us to take them out of the country on condition that they be returned in 18 months," Bingham wrote about skeletal remains to Gilbert H. Grosvenor of the National Geographic Society.
"The whole matter has assumed a very large importance in the eyes of the Peruvians, who feel that we are trying to rob their country of its treasures," Bingham wrote in the letter, which CNN obtained from the Peruvian government.
But Yale's stewardship of the artifacts has often been lost in the argument, Verano noted.
"Unfortunately in issues of bureaucracy, the injured party -- in this case Peru -- gets swept up in nationalism and human rights," the anthropologist said.
Machu Picchu, the 15thcentury Inca citadel where the relics were found, is a national treasure in Peru. The government declared the site a Peruvian Historical Sanctuary in 1981, and the ruins were designated a UNESCO World Heritage Site in 1983. That makes the relics even more significant to many Peruvians.
"Machu Picchu is Peru's premiere self-identity and tourism site," Verano said, pointing out that the ruin gets 1 million visitors annually and Peru earns $100 million in ticket and permit sales.
On the flip side, there's the issue of Yale's investment.
"Yale spent a lot of infrastructure money conserving the objects and preserving them," Verano said.
Yale could argue, he said, that Peru does not have the facilities to properly store the artifacts.
"It's true that the infrastructure quality in Peru is very poor," Verano said. "There are objects rotting there."
Garcia, Peru's president, acknowledged those difficulties in his statement Friday.
"With all these goods in Peru," he said, "we need a place where the Universidad San Antonio Abad can exhibit them and we will request a supplemental credit to parliament, a budget enabling of the millions required to enable a house, a building where these artifacts can be exhibited, where archaeologists from Cusco, Peru, Yale and around the world can continue its studies."
Yale also may have been reluctant to return the artifacts because it did not want to set a precedent.
"Once a museum returns something," Verano said, "other countries would jump in and want something back." Not to mention, he said, that "every museum hates to give all their stuff away."
Verano, who has spent every summer for the past 26 years digging through the ruins of north and central Peru, understands each side's argument.
"I have sympathy for both sides," he said. "In this case, there have been missteps and there should have been more diplomacy on both sides."