The crystal structures and magnetic properties of RFe6−xGa6+x (R=Ce, Pr, Nd, Sm, and Gd) alloys have been investigated by x-ray powder diffraction and magnetic measurement. A ternary intermetallic compound with an orthorhombic ScFe6Ga6 type structure is found in these alloys. The lattice parameter contraction is observed when the higher atomic number lanthanides are substituted into the intermetallic. In each unit cell, there are six nonequivalent crystal positions, i.e., 2a, 4e, 4f, 4g, 4h, and 8k, which are occupied by 2R, 4GaI, 4(FeI,Ga), 4GaII, 4GaIII, and 8FeII, respectively. The RFe6−xGa6+x alloys have ferromagnetic ordering but the magnetic transitions have been found in Nd based alloy. The RFe6−xGa6+x alloys show a soft magnetic behavior but the magnetization hysteresis loops have been observed in the Nd and Sm alloys at 5 K. The saturated magnetic moments per molecule tend to increase from Ce to Nd. However, a drastic decrease of magnetic moment in GdFe6Ga6 alloy is observed and is likely due to the Gd spin alignment being antiparallel to Fe spin. The saturation magnetic moments of these alloys are calculated and agree with the experimental values.