Definitions of of necessity:

  • adverb:   in such a manner as could not be otherwise