(CNN) -- German art collector Cornelius Gurlitt, whose nearly priceless collection was confiscated because it was suspected to contain pieces looted by the Nazis, died Tuesday and left the masterpieces to a Swiss museum.
One day after Gurlitt's death at the age of 81, the Museum of Fine Arts Bern announced that Gurlitt had named it "his unrestricted and unfettered sole heir."
The news came as a surprise, the museum said Wednesday, because Gurlitt had never had any connection to it. The museum's directors are delighted at the news, they said in a statement, but also recognize that there are outstanding legal and ethical questions surrounding the collection.
Gurlitt had undergone major heart surgery and was hospitalized for many weeks, his representative said in a statement.
Gurlitt grabbed the attention of the art world when German prosecutors seized more than 1,200 paintings from his Munich apartment in 2012, including works by Picasso and Matisse.
The collection was confiscated as part of an investigation into tax fraud, but then it was thought that some of the paintings may have been works that were looted by the Nazis.
Just last month, part of the collection was returned to Gurlitt as part of a deal with Germany's cultural authorities and the Bavarian Justice Ministry.
Under the agreement, works owned by Gurlitt that were not under suspicion were returned to him. Those suspected of being stolen were to be held securely while a task force investigates their provenance -- and will be returned to their original Jewish owners or their descendants if a claim is proven.
Gurlitt's representative said that with the art collector's death, the investigation into the collection ceases.
The court that was handling the investigation proceedings will now function as an estate court in the case.
Among the staggering haul found in Gurlitt's Munich, Bavaria, apartment in early 2012 were paintings by Pablo Picasso, Henri de Toulouse-Lautrec, Oskar Kokoschka, Canaletto, Pierre-August Renoir, Franz Marc and Gustav Courbet.
Gurlitt had said he never suspected that the collection he inherited from his father might include stolen artworks.
Thousands of pieces of art condemned as "degenerate" by the Nazis were confiscated from galleries and private collectors in the 1930s and 1940s. Other works were stolen from Jewish families or sold for a fraction of their true value as the owners tried to flee the country.
Gurlitt's father, Hildebrand Gurlitt, who was part Jewish, survived the war as one of only four "degenerate art" dealers permitted by Adolf Hitler.