
The saving of lives supercedes the Sabbath, If a Jew is in danger of losing his life one may violate the Sabbath to save him. For example, if a Jewish baby is drowning in the sea one may throw out a fishing net to catch him, even if fish will also be caught in the net. (One is forbidden to fish on the Sabbath if there is no saving of lives involved.) But if it is a gentile who is in danger of losing his life, one does not violate the Sabbath to save him. One of the sages, Rav Yosef, ruled that one may violate the Sabbath to save a person whose life is in danger, even if it is highly doubtful that he is a Jew. For example: a group of nine gentiles and a single Jew (a majority of gentiles and a minority of Jews) were walking together, and when they entered a courtyard a landslide of stones fell on one of them — it is unsure whether the person was the Jew or one of the gentiles. One is permitted, due to doubt, to remove the stones and save him on the Sabbath. The scholars asked: Did not a different sage, Rabbi Yochanan, rule that if a group walked together, a majority gentiles and a minority Jews, and one of them is in danger of losing his life but we do not know if this person is one of the Jews or one of the gentiles, we do not violate the Sabbath for him? The two Halachic rulings contradict each other, for one permits the violation of the Sabbath to save the life of even a Jewish minority and the other forbids it. Answer: The rulings do not contradict each other; each rule was determined for a different situation. The first sage permitted violation of the Sabbath if the whole group walked together and stones fell on one of them. In this case we violate the Sabbath lest the victim be Jewish. The second sage forbade violation of the Sabbath in cases where some of the group broke off and went in a different direction, and stones fell on one of the breakaway group.
(Babylonian Talmud, Tractate Shabbat 84b)