Nanometer‐scale gratings have been fabricated in InP and InGaAs/InP heterostructures using electron‐beam lithography and reactive‐ion etching in methane‐hydrogen plasmas. It is shown that the slight overcut obtained in the etch profiles during a single‐step etch in CH4/H2 is due to polymer formation on inert mask surfaces and edges. Intermittent removal of the deposited polymer film is shown to be effective in obtaining anisotropic profiles. Highly anisotropic 35‐nm‐wide InP lines at 70‐nm pitch demonstrate the potential of this fabrication process. The formation of 100‐nm‐wide free‐standing InP wires is also presented.