TECHNOLOGY FOCUS - CHEMICAL ENGINEERING - Preferred Method: The compressing step is carried out in a compressor having at least two stages including at least a lower-pressure stage with a first inlet and a higher-pressure stage with a second inlet. The gas stream is introduced into the compressing step on the second inlet side. The second permeate stream is introduced into the compressing step on the first inlet side. The compressed gas stream is cooled by heat exchange against the first and/or the second permeate streams before the step of the introducing the compressed gas stream. It is cooled at 20--25, 10--10 or -40degreesC before the step of introducing the compressed gas stream. The process includes passing the second residue stream to a third membrane separation step. The third membrane separation step comprises (a) providing a third membrane unit containing a third membrane having a third feed side and a third permeate side; (b) introducing the second residue stream into the third membrane unit at a third inlet of the third feed side, and passing the second residue stream across the third feed side; (c) withdrawing from a third outlet of the third feed side a third residue stream enriched in nitrogen compared with the second residue stream, and containing at least50% nitrogen; and (d) withdrawing from the third permeate side, at a fourth pressure lower than the first pressure and above 25 psia, a third permeate stream depleted in nitrogen compared with the second residue stream, and containing not more than 40% nitrogen. The first membrane exhibits a selectivity for methane over nitrogen, when in use in the process, of not more than 5. Preferred Parameters: The first pressure is at least400 (preferably 500-1200) psia. The second and third pressures are both at least100 or at least200 psia. The ratio of first pressure:second pressure and The ratio of first pressure:third pressure are both 3-10.    TECHNOLOGY FOCUS - ORGANIC CHEMISTRY - Preferred Component: The gas stream comprises natural gas, and contains at least10% nitrogen. It further comprises water, carbon dioxide or at least3C hydrocarbons. The first permeate stream contains not more than 6 (preferably not more than 4)% nitrogen, and at least70% of the methane content of the gas stream. The second residue stream contains at least60 (preferably not more than 40)% nitrogen. The third residue stream contains at least60% nitrogen. The second and third permeate streams contain not more than 30 nitrogen.    TECHNOLOGY FOCUS - POLYMERS - Preferred Material: The first and second membranes comprise silicone rubber.