Updated

Two famed early works by Pablo Picasso will stay in New York City museums after the institutions reached an out-of-court settlement over a lawsuit alleging the previous owner was forced by the Nazis to sell his artworks in the 1930s.

The settlement was announced Monday in federal court as the case was about to go to trial. Details of the settlement, including the amount to be paid to the heirs, were not released.

The family of a Jewish banker sued the Museum of Modern Art and the Solomon Guggenheim Foundation for the paintings, Picasso's "Boy Leading a Horse," owned by MoMA, and the Guggenheim's "Le Moulin de la Galette."

U.S. District Judge Jed S. Rakoff concluded last week that the family of Paul von Mendelssohn-Bartholdy, who died in 1935, had produced enough evidence that the paintings had been sold under Nazi duress for the case to go to trial.

Before his death, Mendelssohn-Bartholdy took steps that his heir Julius H. Schoeps said were intended to protect his estate and art collection. Mendelssohn-Bartholdy was Schoeps' great-uncle.

The two paintings, which both date from the early 1900s, were sold to the Jewish art dealer Justin Thannhauser in 1934 or 1935. Thannhauser fled Germany and spent much of the war in Switzerland.

He kept "Le Moulin de la Galette" until 1963, when he gave it to the Guggenheim museum. It was painted in 1900, according to the museum's Web site. He sold "Boy Leading a Horse" to former MoMA chairman William Paley in 1936. Paley gave it to MoMA in 1964, according to the museum's Web site, which dates the painting from 1905-06.

On Monday, the judge criticized that the settlement would keep secret the history of the paintings. "I find it extraordinarily unfortunate that the public will be left without knowing what the truth is," Rakoff said.

He also said he would consider ordering some of the settlement information to be made public.

The museums had denied that the paintings were obtained under duress, boasting in a letter to Rakoff two weeks ago that they looked forward to a trial. Rakoff said the heirs insisted that the museums should have known they had acquired the paintings under circumstances that were suspect.

"The public surely would want to know now and forever which of those diametrically different views was true, and the great crucible of a trial would have made that known," Rakoff said.

Gregory Joseph, a lawyer for the museums, said the museums had offered to settle the case in August but a deal had been unlikely until the judge's ruling last week. He said settlement discussions resumed promptly after the opinion was released.

John Byrne, a lawyer for the heirs, agreed with Joseph's comment.

In a joint statement announcing the settlement, the museums said the continued ownership of the masterpieces "ensures that members of the public — including millions of visitors, students, scholars, and others — will continue to enjoy them for generations to come."