Yale got its wish in court on Thursday when a federal judge in Washington, D.C., ruled that Peru’s lawsuit against the University should be heard by the United States District Court in Connecticut.

After years of on-and-off negotiations, Peru filed suit against Yale in December, hoping to win the return of the Inca artifacts excavated by Yale explorer Hiram Bingham III from Machu Picchu nearly a century ago. The artifacts are now housed at the Peabody Museum of Natural History.

Since Peru initiated its lawsuit, Yale has argued that the United States District Court for the District of Columbia has no jurisdiction over the matter.

“None of Peru’s claims have any merit,” Yale’s lawyers wrote in a motion calling for the case to be dismissed earlier this year, “but even if Peru’s claims had any merit … the District of Columbia would not be the right place to resolve them.”

Judge Henry H. Kennedy Jr. ruled Thursday in Yale’s favor, though he only transferred the case, instead of dismissing it. Peru’s lawyer, William Cook of DLA Piper, sounded optimistic after learning of the decision, even though he said this spring that “the issue is that D.C. is the appropriate place for the case to be heard.” Peru even filed a 57-page amended complaint in April outlining decades of history that the country said explained why the court in Washington should hear the case.

On Thursday, though, Cook said this in an e-mail message: “We are totally comfortable with the case being tried in Connecticut, and the people of Peru look forward to the opportunity to present the merits of their case to the Court in New Haven.”

University General Counsel Dorothy Robinson applauded the court’s decision on Friday, though she said Yale still sees no merit to the case.

“We had worked hard with them to reach a solid framework for a resolution,” she wrote in an e-mail message. “Peru may want to revisit its intentions in the case, which we hope will be productive.”