The only thing Israel has done wrong is allowing the problem to stay. Kick the Palis out, let them live with their arab brothers.
First mistake: Abraham listened to Sarah, and "went into" Hagar, instead of waiting for Sarah's 'Child of the Promise'.
Second Mistake; The Children of Israel failed to follow the Almighty's orders, and left alive the remnant of the Canaanites, Hittites, Perizites, Jebusites, Hivites, and Philistines. At least the last of the Amelekites (Haman & his family, in Esther) were finally wiped out.
Skip ahead 3,500 years....