JERUSALEM — The legal battle for the ownership of Franz Kafka’s papers was a trial the likes of which only Kafka could have imagined: opaque, endless, absurd.

On one side was the 85-year-old former El Al ground crew member who had never met Kafka but who nevertheless inherited his papers, which she kept for decades in a cramped, cat-filled apartment in Tel Aviv. On the other side was the state of Israel, which demanded the rights to the archive of a writer who had never set foot in Israel or the region of Palestine and whose relationship to Zionism was — in typical Kafka fashion — fraught.

Eva Hoffe, who had the papers, lost her argument after appealing to Israel’s Supreme Court in 2016. Israel’s National Library won possession of the massive trove she had hoarded in her apartment and in safe-deposit boxes in Israel and Switzerland.

On Aug. 7, the library unveiled the final batch of these papers, a collection that includes letters and drawings that have never before been seen in the original handwriting.

Stefan Litt, the library’s archivist responsible for the archive, displayed a mix of single pages and entire notebooks of Kafka’s works, including letters, postcards, journals and rough drafts of novels in progress. What drew the most smiles that day was a fragment of an autobiography Kafka began in 1909: “Out of all the children in my school, I was stupid but I was not the most stupid.”

“We are delighted to have reached the end of this chapter,” said Litt. The library spent more than a a quarter-million dollars on over a decade of contentious litigation that saw scholars from Israel, Germany and the United States fiercely debate questions of nationality, religion and ownership.

Before she died in 2018, Hoffe blasted the Israeli government for depicting her as a crazy cat lady out to make a profit.

“They made me out to be a liar, a millionaire, greedy, not normal, without principles,” she told the Israeli newspaper Haaretz.

She also strongly objected to the subtext of Israel’s claim on the papers, which was that the posthumous legacy of Kafka, as a Jewish writer, belonged in the Jewish state.

“The attempt to portray Kafka as a Jewish writer is ridiculous,” Hoffe told the scholar Benjamin Balint, an episode he records in “Kafka’s Last Trial,” his 2018 book on the case. “He did not love his Jewishness. He wrote from his heart, inwardly. He didn’t have a dialogue with God.”

Talia Kopelman-Pardo, the judge who evaluated an earlier iteration of the case in Tel Aviv District Court in 2012, dismissed that criticism. “The question of (Kafka’s) nationality or his religion wasn’t an issue at all and never came up in court,” she said. “(Hoffe) didn’t raise it there.”

But Meir Heller, the lawyer who represented the National Library, argued at times that many of Kafka’s relatives were killed in the Holocaust.

“In every case, there are several layers of arguments and justifications to the end result,” he said in an interview. “I can tell you that as a Jew and an Israeli, in a general way here in Israel, when we are discussing issues from that time period, it’s always on our mind.”

The vicissitudes of Kafka’s identity remain a matter of academic debate. As Kafka himself once wrote: “What do I have in common with Jews? I hardly have anything in common with myself.”

How the papers came into Hoffe’s possession was a plot twist straight from the novelist’s fiction.

Hoffe’s mother, Esther Hoffe, had been the secretary to Max Brod, a prolific German-speaking Czech writer who was Kafka’s closest friend and appointed literary executor.

It was Brod who received Kafka’s remaining letters and manuscripts when Kafka died in 1924 from tuberculosis; he had been asked to destroy them all.

“Dearest Max,” Kafka wrote to Brod, “My last request: Everything I leave behind me . . . in the way of diaries, manuscripts, letters (my own and others’), sketches and so on, to be burned unread.”

Brod ignored that wish, publishing classics such as “The Trial (1925), “The Castle” (1926) and “Amerika” (1927) and creating the mystique of Kafka the spectral enigma, the almost mystical persona who fades in and out of view at the center of 20th-century literature.

When the Nazis came to power in 1939, Brod shoved Kafka’s precious archive into suitcases and carried them to Palestine, where he later became a fixture of Israeli cultural life and remained the rest of his life. When he died in 1968, he left his literary estate — including Kafka’s papers — to Esther Hoffe, and his will stipulated that the estate would eventually be deposited, at Hoffe’s discretion, in “the library of the Hebrew University of Jerusalem, the Municipal Library of Tel Aviv, or another public archive in Israel or abroad.”

But Esther Hoffe, who died in 2007, never chose an archive to house the papers, and even sold rare pieces in high-profile international auctions — most notably the manuscript of Kafka’s “The Trial,” which she sold at auction at London’s Sotheby’s in 1988 for $2 million.

Her willingness to sell off parts of the estate would later undermine her daughter Eva’s attempt to establish her own right to the papers. Eva Hoffe had been interested in selling a portion of the papers to Germany’s National Literary Archive in Marbach, where the papers of many other German-speaking Central European writers are deposited.

In its 2016 ruling, Israel’s Supreme Court declared the following: “Brod wanted his estate to end up in the trusted hands of a body that was appropriate to his ambitions as a writer. He did not want his estate, and everything in it, to be sold to the highest bidder.”