Before migrating to the far north (Judges 18), the tribe of Dan tried to settle in Israel's southwest (Joshua 19:40–48). This led to direct conflict with the incoming Philistines.
Zorah was west of Judah, in the area newly occupied by the Philistines. Both Dan and neighboring Judah submitted to Philistine control (Judges 14:4; 15:11).