A graph is said to be in \({L}_1\) if \(\deg(u) + \deg(v) \geq |N(u) \cup N(w) \cup N(v)| – 1\) for each induced path \(uwv\) of order three. We prove that a \(2\)-connected graph \(G\) in \({L}_1\) of diameter two is hamiltonian, or \(K_{d,d+1} \subset G \subset K_{d} + (d + 1)K_1\) for some \(d \geq 2\). This theorem generalizes a couple of known sufficient conditions for a graph to be hamiltonian. We also discuss the relation between this theorem and several other degree conditions for hamiltonicity.