However , the nine judges on the High Court of Justice also said in their unanimous ruling that Israel could build the barrier inside the West Bank , provided the government did so for security needs and not political considerations .