The extreme of his rigor Elijah displayed toward teachers of the law. From them he demanded more than obedience to the mere letter of a commandment. For instance, he pronounced severe censure upon Rabbi Ishmael ben Jose because he was willing to act as bailiff in prosecuting Jewish thieves and criminals. He advised Rabbi Ishmael to follow the example of his father and leave the country.
His estrangement from his friend Rabbi Joshua ben Levi is characteristic. One who was sought by the officers of the law took refuge with Rabbi Joshua. His pursuers were informed of his place of concealment. Threatening to put all the inhabitants of the city to the sword if he was not delivered up, they demanded his surrender. The Rabbi urged the fugitive from justice to resign himself to his fate. Better for one individual to die, he said, than for a whole community to be exposed to peril. The fugitive yielded to the Rabbi's argument, and gave himself up to the bailiffs. Thereafter Elijah, who had been in the habit of visiting Rabbi Joshua frequently, stayed away from his house, and he was induced to come back only by the Rabbi's long fasts and earnest prayers. In reply to the Rabbi's question, why he had shunned him, he said: "Dost thou suppose I care to have intercourse with informers?" The Rabbi quoted a passage from the Mishnah to justify his conduct, but Elijah remained unconvinced. "Dost thou consider this a law for a pious man?" he said. "Other people might have been right in doing as thou didst; thou shouldst have done otherwise."