Menahem Schmelzer, a Hungarian refugee who for more than two decades was the custodian of one of the world’s greatest collections of ancient Hebrew and other Jewish manuscripts and books as the librarian of the Jewish Theological Seminary, died on Dec. 10 at his home in Manhattan. He was 88.

During Professor Schmelzer’s tenure as chief librarian, from 1964 to 1987, the seminary’s collection of almost 245,000 volumes was a primary destination for scholarly inquiry into the history and literature of the Jewish people.

It houses a rare-book room with irreplaceable contents: volumes of Talmud and Passover Haggadahs from the Middle Ages; richly decorated marriage documents from the 17th century; a 15th-century prayer book illuminated with gold leaf that had belonged to the Rothschild banking family; handwritten works by Maimonides; a Torah scroll rescued from the Spanish Inquisition.

Scholars from around the world consulted with Professor Schmelzer, often about arcane factual details, because of his familiarity with so many books and his near photographic memory.

“He could tell you what book it was in, where the book was on the shelf, and where in the book it was,” said his daughter Nomi Stillman.