We exploit Zlil Sela’s description of the structure of groups having the same elementary theory as free groups: they and their finitely generated subgroups form a prescribed subclass E of the hyperbolic limit groups. We prove that if G1, . . . , Gn are in E then a subgroup Γ ⊂ G1 × · · · × Gn is of type FPn if and only if Γ is itself, up to finite index, the direct product of at most n groups f...