JERUSALEM — Rabbi Yosef Shalom Elyashiv, revered by Jews worldwide as the top rabbinic authority of this generation for his scholarship and rulings on complex elements of Jewish law, died Wednesday, hospital officials said. He was 102.
Rabbi Elyashiv devoted his life to Torah study and credited his longevity to never getting angry. He rejected worldly possessions and chose instead to live modestly in a tiny Jerusalem apartment, where people lined up, seeking advice, blessings, and rulings on religious issues.
The Shaare Zedek hospital in Jerusalem said Elyashiv died there after a long illness.
Rabbi Elyashiv was the leader of the Lithuanian sect of ultra-Orthodox Ashkenazi Jews that adhere to a strict religious lifestyle and ideology renowned for its analytic form of studying complex Jewish holy texts.
He also served as the spiritual leader of Degel Hatorah, a small ultra-Orthodox party in the Knesset, Israel’s parliament. The party later merged into the influential United Torah Judaism that consists of various small religious parties.
Party members conferred with Rabbi Elyashiv on all matters — political, religious and personal — and a few words uttered by the elderly rabbi could sway Israeli policy or affect daily life for devout Jews.
For his hundreds of thousands of followers around the world, Rabbi Elyashiv was considered a sage and a respected arbitrator of the intricacies of Jewish religious law and practices.
‘‘In his rulings, Rabbi Elyashiv left a deep mark on the ultra-Orthodox world and on the entire people of Israel,’’ Prime Minister Benjamin Netanyahu said in a statement. ‘‘The rabbi’s way was that of love of the Torah and love of man, humility, and the protection of the sanctity of life.’’
President Shimon Peres, the mayor of Jerusalem, the country’s chief rabbi, and many others also offered condolences.
Menachem Friedman, a professor emeritus of Bar Ilan University and an expert on ultra-Orthodox Judaism, called Rabbi Elyashiv ‘‘an extraordinary scholar.’’
‘‘He lived in great modesty in a small, rundown apartment, and people would flock there day and night seeking answers to complex questions of Jewish law and asking for blessings,’’ Friedman said. ‘‘Often they would line up outside in the alley for hours just to catch a glimpse of the rabbi.’’
Friedman said Rabbi Elyashiv was a kingmaker who worked behind the scenes to approve the appointment of Israel’s chief Ashkenazi rabbis, as well as Jerusalem’s first ultra-Orthodox mayor, Uri Lupolianski, in 2003.
Rabbi Elyashiv was unique in that his rulings transcended the divide among the different Jewish sects. His authority was accepted by all but the most fringe groups, Friedman said.
Rabbi Elyashiv was born to a rabbinical family in Lithuania. He moved at a young age to Jerusalem, where he grew up in the insular ultra-Orthodox neighborhood of Mea Shearim.
He served as a judge in the sensitive position of the rabbinical appeals court until 1974, when he retired. The rabbi then devoted his time to Talmudic scholarship, mainly in an otherwise abandoned building in Jerusalem, so he could study alone without interruption, Friedman said.
The rabbi ruled on a wide range of issues. He condemned a directive by a group of radical Israeli rabbis in 2010 forbidding renting or selling property to non-Jews. Rabbi Elyashiv said those who supported the ruling should ‘‘have their pens taken away.’’ His opinion prompted several rabbis who signed the edict to retract their signatures.
He spoke against Jews visiting the Jerusalem shrine they know as the Temple Mount, which was home to the Jewish temples in biblical times until destroyed by the Romans in 70 A.D.
He said that Jews are not ritually pure enough to set foot on the sacred ground today and that visits by Jews could lead to bloodshed, because the Al-Aqsa Mosque, Islam’s third-holiest site, stands there now.
In another ruling, he banned ultra-Orthodox women, who cover their hair for modesty, from wearing Indian-made wigs in case the wig hair had previously been used in Indian worship, which would disqualify them for Jewish ritual.
The edict prompted the burning of thousands of wigs in Israel, as well as in Jewish communities in Brooklyn and elsewhere.
Rabbi Elyashiv also made several proclamations that drew the ire of the mostly secular Israeli public.
He vehemently opposed ultra-Orthodox Jews serving in the Israeli military and opposed secular studies for his community, fearing that outside influences could change their traditional way of life.
And he forbade Jews from wearing Crocs shoes on Yom Kippur, the Day of Atonement, because he said they were too comfortable for the somber atmosphere of the day of fasting and repentance.
‘‘He wakes up about 3:30 in the morning, studies for a few hours, and then leaves at 6:00 for prayers at a small synagogue nearby,’’ said Shlomo Kook, an aide to the rabbi.
‘‘He told his students that the secret to his long life is never to get angry and never take things personally or to heart, except Torah study, which should be taken straight to the heart,’’ Kook said.