|“||ABC:Joshua 21:23 And out of the tribe of Dan, Eltekeh with her suburbs, Gibbethon with her suburbs,
24 Aijalon with her suburbs, Gathrimmon with her suburbs; four cities.
ABC:1 Chronicles 6:66 And the residue of the families of the sons of Kohath had cities of their coasts out of the tribe of Ephraim.
At first glance, this would appear to be a contradiction. However, as pointed out by Limestone Church of Christ, the books of Joshua and 1 Chronicles were authored almost 1,000 years apart (1370 B.C. and 450 B.C. respectively). The simple solution is that the city was originally given to the tribe of Dan, but the Danites failed to conquer the city, resulting in its being allotted to the tribe of Ephraim instead. This is excellently summarized by the Jewish Virtual Library:
|“||The city is included in the tribal area of Dan (Josh. 19:42) and in the list of levitical cities (Josh. 21:24; I Chron. 6:54), but the Danites were unable to subject the Amorites, and later the region came under the influence of the 'house of Joseph' (Ephraim; Judg. 1:34–35). The valley became a field of battle between the tribes of Dan, Ephraim, Judah, and Benjamin on the one side and the Amorites and Philistines on the other (I Chron. 7:21; 8:6). The region was finally conquered by the Israelites under David. Aijalon is included in Solomon's second administrative district under 'the son of Deker' (I Kings 4:9)."||”|
Thus Aijalon was given to two different tribes at two different times as seen from Judges 1:34-35. Dan's failure to stabilize the land intended for them resulted in Ephraim instead taking control of it.