Rav Hai Ben Sherira gaon (939–1038), gaon of Pumbedita, was a molder of halakhah and the most prominent figure of his time. From 986 he was the av bet din in the academy of Pumbedita, acting as the deputy to his father Sherira gaon; in this role he left his mark upon the mode of studies and general orientation of the academy. According to some, Rav Hai Gaon had a share in composing the Iggeret Rav Sherira. Rav Hai Gaon was a descendant of King David and last of the influential Geonim. Over one-third of the existing responsa (almost one thousand) in Hebrew, Aramaic, and Arabic are from him. He ruled that in the case of conflict, the Babylonian Talmud took precedence over the Jerusalem Talmud.