Author Franz Kafka had wanted his manuscripts to be destroyed when he died in 1924. (File/Associated Press)

A Tel Aviv court has ruled that a collection of manuscripts written by Franz Kafka and Max Brod must be transferred to the Israeli National Library in Jerusalem.

The ruling brings an end to a heated, protracted court case.

Tel Aviv sisters Eva Hoffe and Ruth Wiesler insisted on keeping the vast collection of rare documents, which they inherited from their mother, Esther Hoffe, Brod's secretary. 

In a document sent to news media Sunday, the court ruled that the documents were not given as gifts to the sisters.

The National Library argued that Brod, Kafka's close friend, left the manuscripts to the National Library in his will.

Kafka bequeathed his writings to Brod shortly before his own death from tuberculosis in 1924, instructing his friend to burn everything unread. Brod ignored his friend's request and instead, published his work.

Brod fled Czechoslovakia in 1939, after Germany invaded, for Palestine. He died in 1968, bequeathing his collection to his secretary Esther Hoffe.

The court ruled on Sunday that Brod had clearly 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."