Judges come up with a plan to end a long-running saga which has fuelled Israel-Palestinian tensions.