The theory of associated prime ideals of anR-module, and of tertiary decompositions, generalizes toL-modules, whereL is a complete modular lattice and anL-moduleM is a complete modular lattice together with an appropriate module actionp:L×M→M. Given appropriate chain conditions onL andM, the theory of associated prime ideals, existence and uniqueness properties for tertiary decompositions, and a form of the Krull intersection theorem all hold in generalized form. If more stringent conditions apply, the theory reduces to a generalized theory of primary decompositions and a second uniqueness theorem holds. The theory can be applied to congruence lattices of algebras in congruence-modular varieties of algebras, using the generalized commutator operation. An important special case is the theory of finite groups, where the descending chain condition allows a natural choice of a distinguished tertiary decomposition and this yields a canonical decomposition of any finite group as a subdirect product of “cotertiary” finite groups. The group-theoretic application of the tertiary theory yields elementary structure theorems about Galois extensions of fields, where the tertiary decomposition of the Galois group transforms into a representation of a Galois extension as a compositum. For example, given a fieldF, there are distinguished “tertiary” field extensions ofF, of which all other finite Galois extensions ofF are compositums.