R. Shimon bar Yohai was a fourth-generation tana, and student of R. Akiba. He was numbered among those who strongly opposed the Roman rule in Eretz Israel after the Bar-Kokhba rebellion, due to the Hadrianic decrees forbidding circumcision and Sabbath observance, and the execution of R. Akiba. R. Shimon prayed and longed for the fall of Rome to the Parthians, who were the main enemy of Rome, and once said: “Should you see a Persian horse tethered in Eretz Israel, anticipate the coming of the Messiah” (Eicha Rabba, 31:13)

As the Babylonian Talmud relates, the Roman pursuit of R. Shimon bar Yohai and his son, R. Elazar, began following a meeting that took place between R. Shimon, R. Yehudah bar Ilai and R. Yosei in the house of study. After they concluded speaking about holy matters, they spoke of current events, and R. Yehudah began praising the Romans for their public works in the Land. Opposing him was R. Shimon bar Yohai, who said: “All that they made they made only for themselves; they built market-places to set brothels in them; baths, for their pleasure; bridges, to levy tolls for them.” (BT Shabbat  33b). R. Yosei remained silent.

Word of this conversation reached Roman ears by way of an informant, and R. Shimon was sentenced to death and forced to go underground. Pursued by the Roman authorities, he fled together with his son, Elazar. The two hid in various places, including in the house of study of R. Yehoshua ben Hananya, which, according to tradition, is the site of the ancient synagogue at Peqi’in.

After a period in the house of study, R. Shimon and his son were forced to flee again, arriving ultimately at the cave in Peqi’in, concealed by the giant carob that to this day decorates its entrance. There they hid for 13 years.

They were nourished by the fruit of the carob and drank from the spring until the threat abated and they were able to emerge from the cave without fear. According to age-old tradition, R. Shimon wrote the holy Zohar. The site is also considered sacred by the non-Jewish residents of Peqi’in. According to scholars, the strong earthquake that struck in the area in ancient times created the crevice from which the abundant spring flows forth.

There is a local tradition that the ancient community of Peqi’in was originally on a different hilltop, to the north – Ras ‘Abd. After the present site was discovered and rendered famous on account of this same holy Tana and the abundant spring, the residents of Peqi’in, at the time a completely Jewish settlement, moved to the present location. Here their lot was greatly improved due to the rich soil and other virtues of the place.

When R. Menahem Mendel of Ravin undertook his journey to pray at the holy sites some one hundred and twenty years ago, he and his entourage reached the cave of R. Shimon, He writes:

“We hastily set out for the morning prayers at the mouth of the cave, where the Tana R. Shimon bar Yohai and Elazar his son hid for thirteen years. The carob still stands there at the entrance to the cave. We prayed there together under the shade of the carob, and recited from the Zohar at the cave’s entrance, but we did not enter. We also took some of the carob leaves in our pouches, as many as we could carry, since they are widely known for their wonderful remedial power, as extremely dear, [and worthwhile] to retain in one’s home.

However, the custodian commanded us not to touch the fruit of the carob, since one who partakes of it will be punished, and is taking his life into his hands. He showed us a number of sticks there from branches of this carob, cut down by non-Jews and planted on their roofs, causing everyone who came to their homes to suffer a bitterness like death, until they destroyed [the trees] to their foundation and returned them to the opening of the cave, where they remain.”