Abstract. Warfield studied p-local groups that are summands of simply presented groups, introducing invariants that, together with Ulm invariants, determine these groups up to isomorphism. In this paper, necessary and sufficient conditions are given for the existence of a Warfield group with prescribed Ulm and Warfield invariants. It is shown that every Warfield group is the direct sum of a simply presented group and a group of countable torsion-free rank. Necessary and sufficient conditions are given for when a valuated tree can be embedded in a tree with prescribed relative Ulm invariants, and for when a valuated group in a certain class, including the simply presented valuated groups, admits a nice embedding in a countable group with prescribed relative Ulm invariants. These conditions, which are intimately connected with the existence of Warfield groups, are given in terms of new invariants for valuated groups, the derived Ulm invariants, which vanish on groups and fit into a six term exact sequence with the Ulm invariants.