Rabbi Gershon, the brother-in-law of the Baal Shem Tov, had finalized his plans to travel to the Holy Land. A disciple of the Baal Shem Tov, he conferred with him before his departure and was told: "When you arrive in the Holy Land make sure to attend the yeshiva of Rabbi Chaim ibn Attar, known as the holy Ohr Hachaim in Jerusalem. He has two separate yeshivas there - one in which they study the revealed Torah, and another, known to only a very few people, where he teaches the esoteric secrets of the Kabbala. Do everything you can to be admitted to the second yeshiva short of divulging your identity, unless you have no choice."
Rabbi Gershon's journey was successful and he arrived in Jerusalem and proceeded directly to the Ohr Hachaim's yeshiva. Anxious to see how they learned there, he attempted to join the students as they reviewed their study. But each time he approached them, he was told that it was permissible to attend the yeshiva only with the explicit permission of the Ohr Hachaim himself. When the Ohr Hachaim would enter the study hall to deliver his daily lesson, all strangers would be asked to leave.
Rabbi Gershon decided to approach the Ohr Hachaim personally and request his permission to learn. "Who are you?" inquired the Ohr Hachaim.
"I am a Jew who has come from Poland and I desire very much to study in your yeshiva," answered Reb Gershon.
The Ohr Hachaim gave him a penetrating, critical look and asked, "Are you fluent in the study of the Five Books of Moses and the Talmud?"
"Yes, I am," replied Reb Gershon.
"Then I give you my permission to remain here, and I will instruct my staff to accommodate you," the Ohr Hachaim said.
Rabbi Gershon was pleased with the outcome and settled down for the week to learn in the yeshiva of revealed Torah. All the while he was inquiring as to how to gain admittance to the yeshiva of Kabbala. He discreetly asked various students about the secret yeshiva, but none of them had the slightest idea what he was talking about. Those few who were the privileged students, refused to answer his repeated questions. So, Rabbi Gershon was forced to approach the Ohr Hachaim again and ask for permission to attend the yeshiva of esoteric study.
The Ohr Hachaim was surprised by the request. "How do you know about the other yeshiva?" he asked, as he stared into Reb Gershon's eyes, plumbing the depths of his soul.
Reb Gershon, wanting to avoid a detailed response, just looked down and said, "I was told by my brother-in-law." He hoped that his answer would pass without further comment.
"What is his name?"
"Oh, his name is Yisrael," was the matter-of-fact reply.
"I don't know him, but you may come to my lecture tonight," was the reply.
For the next three nights Reb Gershon learned Torah with the select group of students, but on the fourth night when he presented himself to the doorkeeper, he was refused admittance. He was astonished and turned to the doorkeeper crying, "Why have I been refused admittance, when I have the permission of the Head of the Yeshiva to attend?"
"I'm sorry, but I am following the instructions of the holy rabbi. He said that you are unworthy of learning the secrets of the Torah , since you have not attended to the needs of the Sages."
Reb Gershon turned away, puzzled, but resolved to do whatever was necessary to rescind the decree of the Ohr Hachaim. He noticed that the Ohr Hachaim donned a special pair of shoes and head covering before entering the bathroom. The next time he saw the Ohr Hachaim put on the special hat, he ran quickly and brought him the shoes. The Ohr Hachaim noted Reb Gershon's actions, but said nothing.
From that time forth, Rabbi Gershon was allowed to resume his midnight studies. He remained happily drinking in the learning at the Ohr Hachaim's yeshiva for the next few months. One day, he told the Ohr Hachaim that his own brother-in-law was a holy man.
"What is his name?" inquired the Ohr Hachaim.
"His name is Reb Israel Baal Shem Tov," Reb Gershon said.
"Oh," cried the Ohr Hachaim, "Of course I know him well. I see him very often in the supernal worlds. He is a holy man of unsurpassed greatness."
"Now I understand what happened to me in the Heavenly Court," continued the Ohr Hachaim. I had been sentenced to have some terrible calamity occur to me because of using a respected student of the Baal Shem Tov to perform a menial task for me. It was only through the intercession of the Baal Shem Tov that I was saved. If you had told me your true identity at once, I would have been saved the entire incident."
After this conversation, the Ohr Hachaim no longer permitted Reb Gershon to study in his yeshiva for, as he said, "You do not need me to teach you, if you have the Baal Shem Tov as a rebbe."