A U.S. federal judge ruled on Tuesday that a Spanish museum is entitled to a 19th century painting that was looted by the Nazis, despite a California family’s claim to its rightful ownership.

U.S. District Judge John F. Walter cited Spanish law when ordering that Camille Pissarro’s painting, "Rue St.-Honore, Apres-Midi, Effet de Pluie," stay at the Thyssen-Bornemisza Museum in Madrid, where it has remained since its purchase in 1993.

Despite confirming the museum’s ownership of the painting, Walter said its refusal to give up the painting was “inconsistent” with international agreements to return all Nazi-looted art.

On the other side of this bitter legal battle was the Southern California family of Lilly Cassirer.

The painting, valued at more than $30 million, was completed in 1897 and purchased by Cassirer’s father-in-law directly from Pissarro’s art dealer. He left it to her and her husband when he died but Cassirer was forced to trade it to the Nazis in 1939 in exchange for exit visas for herself, her husband and her grandson.

The post-World War II German government, thinking the work was lost, paid her $13,000 in reparations in 1958.

But, Pissarro’s artwork was actually one of hundreds that Spain and a nonprofit foundation had acquired from Baron Hans-Heinrich Thyssen-Bornemisza to create the museum that now bears the German industrialist’s name.

The museum maintained that it was unaware the painting was stolen until Cassirer’s grandson discovered it in 1999.

CLICK HERE TO GET THE FOX NEWS APP

The museum's U.S. attorney, Thaddeus Stauber, said he believed the decision finally put an end to a bitter legal fight that has pitted the family of Lilly Cassirer against the museum for 20 years.

"I think it puts an end to it because the court conducted, and we conducted, what the appellate court asked us to, which was a full trial on the merits," he told The Associated Press. "As a lawyer who has been involved in this case for 14 years, I'm pleased that the court did conduct a full trial. We now have a decision on the lawful owner and that should put an end to it."

The Associated Press contributed to this report.