Joshua defeated the king of Gezer when he tried to aid the king of Lachish (Joshua 10:33 ). Gezer formed the boundary for Ephraim's tribal allotment (Joshua 16:3 ), but Israel did not control the city (Joshua 16:10; Judges 1:29 ). Still, it was assigned as a city for the Levites (Joshua 21:21 ). David finally wrested control of it from the Philistines (2 Samuel 5:25; 1 Chronicles 20:4 ). A few years later, Egypt's pharaoh captured the city from the Canaanites and gave it to Solomon as a wedding gift for Solomon's marriage with the pharaoh's daughter. Solomon rebuilt its walls (1 Kings 9:15-17 ). Between the Testaments, Gezer became known as Gazara. The Seleucid general Bacchides fortified it (1 Maccabees 9:52 ). In 142 B.C. the Jewish leader Simon Maccabeus captured Gazara and built himself a home there. Then John Hyrcanus, his son, assumed command of the Jewish army and established his headquarters there (1 Maccabees 13:43-53 ).

Gezer thus is a peripheral city in the Bible whose magnificent history had begun to recede a century before Joshua entered Palestine. Still, it marked an important military outpost for Philistines, Egyptians, Israelites, and Assyrians trying to control the important trade and military routes.