A reactive ion beam etching process (RIBE) of InP with N2 and N2/O2 mixtures is described. The application of N2 or N2/O2 ion beams to InP results in high quality surfaces with the virtual elimination of cone formation. The influence of the process parameters ion incidence angle, ion energy, ion beam current density, and N2/O2 ratio on etching rates is given for InP, Ni, Ti, Al, Si, and two types of photoresist (AZ4210, MP15). N2 RIBE has been used for the fabrication of grating structures with λ=2400 Å periodicity. The gratings have been overgrown by liquid phase epitaxy without any degradation of the initial shape of the structure.