We strengthen the stability theorem of Erdős and Simonovits. Write Kr (s1, . . . , sr) for the complete r-partite graph with parts of size s1, . . . , sr and Tr (n) for the r-partite Turán graph of order n. Our main result is: For all r ≥ 2 and sufficiently small c > 0, ε > 0, for every graph G of order n with ⌈ (1− 1/r − ε)n2/2 ⌉ edges, one of the following conditions holds: (a) Kr+1 ( ⌊c lnn⌋...