The ruling concludes a bitter fight for a horde of thousands of manuscripts, including unpublished Kafka short stories, his private correspondence and Brod's diaries.
For decades, the literary treasures have been stored in private vaults in Tel Aviv and Zurich belonging to sisters Eva Hoffe and Ruth Wiesler. Ms Hoffe also keeps a stash of Kafka's papers in her Tel Aviv home, a small apartment overrun with cats.
Judge Talia Pardo Kupelman wrote in her ruling on Friday that the trial had opened "a window into the lives, desires, frustrations and the souls of two of the greatest thinkers of the 20th century."
The court acted against Miss Hoffe, 78, who said she inherited the papers with her sister when their mother Esther died in 2007, aged 101. Esther Hoffe had been Max Brod's secretary and alleged lover.
The family has spent thousands of pounds in their legal fight for ownership of Brod's manuscripts since the Israeli state archives challenged Esther Hoffe's claim to Max Brod's estate in 1974. When Ms Wiesler died in May this year, Eva Hoffe was left to continue the battle alone.
They were supported in their claim by the German Literature Archive in Marbach, which paid almost $2 million for Eva Hoffe's manuscript of The Trial in 1988, and demanded the right to purchase all the remaining manuscripts, claiming Israel does not have adequate facilities to look after them properly.
Meir Heller, an attorney acting for Israel's National Library, convinced the Tel Aviv court that this was not Brod's intention.
Mr Heller became involved with the case in 2008 when he discovered Brod's last will and testament, which bequeathed the manuscripts to Esther Hoffe but stipulated that she must oversee their transferral to a public archive within her lifetime.
Several days after his discovery, Mr Heller stormed into a legal hearing of Esther Hoffe's will with the dramatic exclamation: "Stop! There is another will!"
"I am thrilled with the court's ruling," Mr Heller said on Sunday. "Knowing Eva Hoffe as I do, I expect she will appeal but I think it is unlikely the court of appeals will intervene."
When Czech writer Kafka died in 1924, a relative unknown, he left his life's work to Brod instructing him to burn the documents unread. Instead, Brod collated, edited and published his writing, including The Trial and The Castle – now literary classics. When Brod fled Hitler Germany in 1939, he took the documents with him.
The National Library of Israel will now embark on a lengthy process of scanning its newly won Kafka archive and publishing its online. The original documents will be displayed in custom-made facilities in the library building.
The priority now is investigating the manuscripts still in Miss Hoffe's flat. There has never been a formal inventory of these documents, Mr Heller claims.