The World Court has declared the barrier , which is about 8 meters ( 25 ft ) tall in places , illegal because it was built on land Israel occupied in a 1967 war , territory where Palestinians hope to build a future state .