uncountable a process, thing, or action that is needed in a situationnecessity for: the necessity for a strong diplomatic effort
necessity of (doing) something: doubts about the necessity of the war
necessity to do something: We both recognize the necessity to get this right.
out of necessity (=because it is necessary): Women increasingly went out to work, usually out of economic necessity.