R' Shlomo Aviner
One Pesach a certain non-Jew came to the Land of Israel from Babylonia pretending to be a Jew, and ate from the Pesach sacrifice. He returned home and boasted how he had deceived the Jews and ate the best portions of the Pesach sacrifice. Rabbi Yehudah ben Beteira asked him: "Did they give you the fatty tail to eat?" "No," he replied. The Rabbi said: "If so, next time you have to ask for it, because this is the best part." This non-Jew obviously didn’t know that we do not eat this part, though it is sacrificed on the altar. The next year he went again to Jerusalem, and requested the fatty tail! They were shocked and asked him where he learned to ask for this part of the sacrifice. He told them that Rabbi Yehudah ben Beteira told him. They sensed what was hidden in his words. They investigated and discovered that he was in fact a non-Jew and killed him. They sent a message to Rabbi Yehudah ben Beteira: You are in the city of Netzivim, but your trap worked in Jerusalem (Pesachim 3b).
Why did they kill him? While it is forbidden for a non-Jew to eat from the Pesach sacrifice, as it is written, "any foreigner may not eat from it" (Shemot 12:43. Mechilta
ibid.), it is not one of the seven mitzvot of the non-Jews for which they receive capital punishment.
The commentators answer this question in various ways:
1. He stole a kezayit (an olive-size piece) of the Pesach sacrifice, and a non-Jew who steals that is liable for death. This is similar to a non-Jew who learns Torah and is liable for death (Rabbi Akiva Schleshinger, Mishnato shel Rabbi Akiva #14). The difficulty with this answer, however, is that he is liable for death by Heaven and not by a Beit Din (court). Rabbi Schlesinger explains: "A Beit Din strikes and punishes for non-Torah transgressions (Yevamot 4b), in order to prevent all breaches - in particular for attacks in matters of the Temple (ibid.).
2. Rav Kook explained that they killed him according to a temporary ruling, because of the desecration of Hashem’s Name (Tuv Ra’ayah, Pesachim).
3. Rav Zvi Hirsch Chayot (Maharatz Chayot) answered that this incident occurred after the destruction of the Temple. The Tosafot already ask: Why didn't Rabbi Yehudah ben Beteira himself make the pilgrimage? They give various answers: He did not own land in Israel, he was elderly and had no strength to ascend, or he was outside of Israel (Tosafot, Pesachim 3b). According to the Maharatz Chayot, this occurred after the destruction of the Temple when there was no obligation to offer sacrifices, and only individuals continued this practice. During this time, the non-Jewish authorities trailed the Jews, because of the fear that they would revolt. The Jews were concerned that the authorities would interpret the offering of the sacrifice and its consumption in a group as an organization to revolt. They therefore did it in secret. They feared that this non-Jew would inform against them to the authorities about the offering of the Pesach sacrifice. The authorities would smell the odor of rebellion in this act and would kill them. This was a case of saving lives, and they therefore decided to get rid of this non-Jew (kuntres "Avodat Ha-Mikdash"). My grandfather and my teacher, Rav Meir Flam, explained that perhaps the Jews combined the offering of the Pesach sacrifice and the organizing of the rebellion, and they therefore did not want the non-Jew to be in the vicinity.