An Israeli court has ruled that a collection of Franz Kafka's works must be handed to Israel's national library.
The ruling settles a long legal dispute over ownership of the documents.
Kafka gave the writings to his friend Max Brod, whose secretary insisted he left them to her. After her death, her daughters refused to hand them over.
It is thought the manuscripts might include unpublished material by Kafka. Brod ignored his friend's request to burn his work when he died.
Instead, Brod published the literature, which turned Kafka into one of the 20th Century's most noted novelists.
Brod fled Czechoslovakia in 1939, after Germany invaded, for Palestine. Upon his death in 1968 he bequeathed his collection to his secretary Esther Hoffe.
But a Tel Aviv family court ruled on Sunday that Brod had explicitly ordered Hoffe to catalogue and transfer his collection "to the library of the Hebrew University in Jerusalem or the Tel Aviv municipal library, or any other public institution in Israel or abroad".
Hoffe in fact kept most of the collection locked away, and sold some of it.
At a trial which started in 2008 in Tel Aviv, Hoffe's daughters argued Brod's intention was to make the collection a gift to their mother.
However, justice Talia Kopelman-Pardo ruled that "the Kafka writings, like the Brod collection," could not be considered a gift to Hoffe's daughters.
"The Brod collection should be handed to the archive," she wrote.
Some of the works are held in safety deposit boxes in Israel and Switzerland. Some were opened in Zurich in 2010, but their contents were only revealed to the Israeli judge.
The director of Israel's national library, Oren Weinberg, praised the ruling.
He said the library would eventually post the collection online "thus fulfilling Brod's wish of publishing Kafka's writings for all literature lovers in Israel and the world."
Kafka and Brod had both been part of the German-speaking Jewish community of Prague.
Kafka died in 1924, aged 40, after suffering from various mental and physical illnesses.
He entrusted his friend Brod with his writings and asked him to destroy them. Instead, Brod had some of them published. They included The Trial and The Castle.