Let L be a finite-dimensional simple Lie algebra over an algebraically closed field F of characteristic p > 3. We prove in this paper that if for every torus T of maximal dimension in the p-envelope of ad L in Der L the centralizer of T in ad L acts triangulably on L, then L is either classical or of Cartan type. As a consequence we obtain that any finite-dimensional simple Lie algebra over an algebraically closed field of characteristic p > 5 is either classical or of Cartan type. This settles the last remaining case of the generalized Kostrikin-Shafarevich conjecture (the case where p = 7). (c) 2007 Elsevier Inc. All rights reserved.