Kenneth G. Wilson (1923). The Columbia Guide to Standard American English. 1993.
necessity (n.)
can combine with the prepositions of, for, and in, as well as with to plus an infinitive, as in They saw the necessity of [for, in] restoring the companys credit; They saw the necessity to restore it.