Lectures on the weekly Torah reading by the faculty of Bar-Ilan University in Ramat Gan , Israel . A project of the Faculty of Jewish Studies, Paul and Helene Shulman Basic Jewish Studies Center, and the Office of the Campus Rabbi. Published on the Internet under the sponsorship of Bar-Ilan University 's International Center for Jewish Identity. Prepared for Internet Publication by the Computer Center Staff at Bar-Ilan University . Inquiries and comments to: Dr. Isaac Gottlieb, Department of Bible, email@example.com
The dealings of the patriarchs with the Philistines are mentioned four times.  In Genesis 20:1-18 Abraham has to present his wife Sara as his sister when he comes to Abimelech king of Gerar  while Genesis 21:22-31 tells of a pact concluded between Abraham and Abimelech. Similar events take place in Parashat Toledot: Isaac presents Rebekah as his sister to Abimelech, king of the Philistines in Gerar (Gen. 26:1-11), and after a conflict over wells, Isaac too makes a pact with the Philistines (verses 13-33).  The Philistines are mentioned again in Exodus 13:17: “G-d did not lead them by way of the land of the Philistines.”
The question which we shall address below is primarily historical: from our knowledge based on non-biblical documents, the Philistine presence in our region did not begin until the time of the Judges, long after the events described in Genesis and Exodus. How can we reconcile the descriptions in the Torah, which imply that there was a Philistine presence in our region as far back as the time of the Patriarchs, with material and epigraphic findings, according to which the Philistine presence here dated no earlier than the 13th century B.C.E.?
Actually, this is not the only subject in the Torah that raises such a difficulty. The first comprehensive treatment of instances where the Torah mentions the names of peoples and places that were known only in later historical periods appears to be in the writings of Ibn Ezra, who in “The Secret of the Twelve” (Sod ha-Shneim-Asar) hinted that certain verses in the Torah could not have been written in the time of Moses, but were added after his death.  However, in his commentaries on the four places where the Philistines are mentioned in the Torah, Ibn Ezra does not include these narratives among those which in his opinion hint at later authorship.
According to one group of scholars, the references to the Philistines in the Torah should indeed be viewed as an anachronism, since archaeological excavation does not inform us of a Philistine presence in the land of Canaan before the time of the Judges. 
On the other hand, other scholars  hold that Eretz Plishtim, the land of the Philistines, mentioned in Genesis is not the same as Pleshet, known to us from the period of the judges and monarchy. According to this approach, the name Plishtim may describe various groups of peoples. This view is based on the differences that exist between the Philistines of Genesis and the Philistines of Judges:
If this interpretation is correct, there is no need to view the references to Philistines in the Torah as an anachronism, rather as referring to a different group of people. The name that these two groups shared in common may be due to their common origin from the area of the Aegean Sea and Anatolia. 
 On the origins of the Philistines and an account of their history, see Singer, “Mitzrayim, Kena’anim, u-Phelishtim be-Tekufat ha-Hitnahlut ve-ha-Shofetim,” in N. Ne’eman and Y. Finkelstein (eds.), Mi-Navadut le-Melukhah, Jerusalem 1990, pp. 348-402; T.K. Dothan, People of the Sea : The Search for the Philistines , New York–Toronto 1992; C.S. Ehrlich, The Philistines in Transition : A History from ca. 1000-730 B.C.E. , Leiden – New York 1996.
 Scholars disagree over the identification of Gerar. See Y. M. Grintz, “Ha-Pelishtim ha-Rishonim,” in Motzaei ha-Dorot, Jerusalem 1969, pp. 99-129; Anson Rainey, “Gerar,” in M. Weinfeld (ed.) Sefer Bereshit (Olam ha-Tanakh), Ramat-Gan 1983, pp. 132-133; Y. Elitzur, “Eretz Gerar,” in his book, Yisrael ve-ha-Mikra: Mehkarim Geographiyim, Historiyim ve-Hagutiyim, Jerusalem and Ramat-Gan 2000, pp. 352-356.
 For a discussion of the different aspects of these narratives, see for example A. Speiser, “The Wife–Sister Motif in the Patriarchal Narratives,” in A. Altmann (ed.), O riental and Biblical Studies , Cambridge 1963, pp. 62–82.
 See the discussion by S. Vargon, “Ha-Bikkoret ha-Gevohah la-Torah be-Einei Shadal,” Shenaton le-Heker ha-Mikra ve-ha-Mizrah ha-Kadum, 12 (2002), pp. 281-295.
 For example, see G. Galil’s commentary on Genesis 26:34 in the series, Olam ha-Tanakh, p. 140.
 Grintz (note 2, above); K.A. Kitchen, Ancient Orient and Old Testament, Chicago 1966, p. 80; V.P. Hamilton, The Book of Genesis, Chapters 18–50 (New International Commentary on the Old Testament), Grand Rapids 1990, p. 94; Y. Elitzur (note 2, above), p. 355, note 19; Da’at Mikra Atlas, p. 76.
 See Y. Meitlis, “Al Mikra, al Keramika ve-al mah she-Beneihem,” in Al Atar, VII: Sefer ha-Sefarim, Sofer ve-Hofer, Alon Shevut 2000, p. 72.