ErNi3Al9, M(r) = 586.22, trigonal, new type, hR78, R32 - f2edc4 (No. 155), a = 7.2716 (5), c = 27.346 (3) angstrom, V = 1252.2 (2) angstrom3, Z = 6, D(x) = 4.664 Mg m-3, lambda(Mo Kalpha) = 0.71073 angstrom, mu = 17.654 mm-1, F(000) = 1614, T = 293 K, wR = 0.021 for 785 contributing unique reflections. The structure is built up of three kinds of monoatomic layer perpendicular to c: Al-atom layers with triangular mesh, Ni-atom layers with triangular mesh and layers containing two rare-earth-metal atoms for one Al-atom triangle. GdNi3Al9 [a = 7.3006 (9), c = 27.478 (5) angstrom, wR = 0.020 for 791 reflections] is isotypic. YNi3Al9 [a = 7.2894 (7), c = 27.430 (5) angstrom, wR = 0.035 for 635 reflections] and DyNi3Al9 [a = 7.2723 (9), c = 27.344 (6) angstrom, wR = 0.027 for 682 reflections] crystallize in related structures with a partly disordered arrangement of Al-atom triangles and rare-earth-metal atoms. Similar monoatomic layers to those in ErNi3Al9 build up the orthorhombic structure of Y2Co3Al9 (Y2Co3Ga9 type). The stoichiometry 1:3:9 is related to that of R2T3Al9 by replacing every second mixed layer of composition R2Al3 by an Al-atom layer (Al3): 6RT3Al9 = 6R2T3Al9 - 3R2Al3 + 3Al3.