North Korea has warned that it will consider any sanctions imposed against it a declaration of war .