but was it morally right? legally?

tactically yes it may have been a good move (before there was no border to move into iran). but can you defend an action that way when it was morally wrong?