per se is not illegal. Rather the occupier is forbidden by intl law to do certain things including applying its civil law to territories occupied. I think you will find Jordan occupied the West Bank; Egypt occupied Gaza.
U.S. Sen. Carper (D-DE) says will support the nuclear deal with Iran in editorial (Reuters)
from the article: 'Freeze-ending' settlement construction was legal, probe finds