Based on X-ray diffraction, microstructure, energy-dispersive X-ray and differential thermal analysis, the phase equilibria at 800°C in the ternary systems {Gd, Er}-Re-{Si, Ge} and Gd-Re-{Al, Ga, Sn} were investigated in the whole concentration range and the isothermal sections of the phase diagrams were constructed. The solubility of the third component in the binary compounds was investigated and it was found that GdSi1.5, Gd5Si3, and GdGe1.97 dissolve 3, 4, and 4 at.% Re, respectively. The existence of eight ternary compounds was confirmed and four new ternary compounds were found; the crystal structures of all the ternary and seven binary phases in the investigated systems were refined. In the related systems {Gd, Er}-T-{Si, Ge} and Y-Re-Ga, 45 compounds were found and the atom coordinates were determined for all of them. 26 of these compounds are new. In total the crystal structures of 63 phases were determined. Four new structure types - ErRe2Si4, Gd4ReGe8, Gd4Ag1.06Ge8.70 and YRe0.15Ga3 - were solved by direct methods. The new monoclinic structure type ErRe2Si4 is closely related to the AlB2 type. The position 1a of space group P6/mmm, occupied by Al atoms in AlB2, corresponds to a position 4d in space group C2/c, and the position of the B atoms (2d) to two 4e positions, which are occupied by Si atoms in ErRe2Si4. Two additional positions 8f in the new structure type are occupied by Re and Si atoms. The Er atoms form straight chains, which run along the crystallographic direction [101], whereas the Re atoms form zigzag chains along [110], and the Si atoms branched chains along [201]. The coordination polyhedra of the Er atoms form dense layers with octahedral voids between them. The crystal structure of the new ternary germanide Gd4ReGe8 represents a new structure type. The structure is related to the CeNiSi2 type. The two structure types contain similar fragments (trigonal prisms and square antiprisms). The structure type Gd4ReGe8 can be derived from the CeNiSi2 type by lowering the symmetry and increasing the unit cell by a factor four. The structure can be represented as a packing of Gd-centered polyhedra with part of voids occupied by Re atoms. The crystal structure of Gd4ReGe8 is also closely related to the structure type Tb4FeGe8, where two Fe sites, with site occupancies of 80 and 20%, respectively, were found. Four Re sites are partly occupied in the structure of Gd4ReGe8. The crystal structure of the new structure type Gd4Ag1.06Ge8.70 can be described as a stacking of trigonal prisms (fragments of the structure type AlB2), square antiprisms (fragments of the structure type BaAl4), and empty cubes (fragments of the structure type ?-Po). Similar layers are present in the structures of other compounds, for example SmNiGe3, ScNiSi3, Ce2CuGe6, and La2AlGe6. A peculiarity of the structure of Gd4Ag1.06Ge8.70 is the packing of Gd-centered polyhedra along the crystallographic directions [100] and [010]. Two types of interlayer occur in the structure: one of them is surrounded by Gd atoms, the other one by Ge atoms. The former is empty, whereas the latter is occupied by Ag atoms. The new structure type YRe0.15Ga3 is closely related to the structure of perovskite. The difference between the two structures resides in site splitting and defects. The crystal structure of YRe0.15Ga3 can be represented as a framework built up from cuboctahedra centered by Y atoms. Some of the octahedral voids in the framework are occupied by Re atoms. The influence of electronic and size factors on the crystal structures of the intermetallic compounds in the systems R-Re-M (M - p-element of groups III, IV) was analyzed. The phase formation and crystal structures were studied in detail for the compositions RT4M2, R2T3M5, and RT1-хM2, where R = Gd and Er, T = d-element, and M = Si and Ge. The following morphotropic transitions of the structure types were found for the compounds of composition RT4M2: CeAu4Si2 - NdRe4Si2 - CeRe4Si2 - ZrFe4Si2 - YFe4Ge2 - HoFe4Ge2; for R2T3M5: U2Mn3Si5 - U2Co3Si5 - Lu2Co3Si5 - Nd2Os3Si5; for RT1-хM2: CeNiSi2 - YIrGe2 - LaMnSi2 - NdRuSi2 - ZrCrSi2 - U3Ni4Si4.