A graph is said to be in if for each induced path of order three. We prove that a -connected graph in of diameter two is hamiltonian, or for some . 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.