We prove that a graph G contains no induced 5-vertex path and no induced complement of a 5-vertex path if and only if G is obtained from 5-cycles and split graphs by repeatedly applying the following operations: substitution, split unification, and split unification in the complement (where split unification is a new class-preserving operation that is introduced in this paper).