  We derive the classical null energy condition, understood as a constraint on
the Ricci tensor, from the second law of thermodynamics applied locally to
Bekenstein-Hawking entropy associated with patches of null congruences. The
derivation provides evidence that the null energy condition, which has usually
been regarded as a condition on matter, is fundamentally a property of gravity.
