the process is sufficiently flexible to process natural gas derived streams containing 5 to 50 mole or more of nitrogen while reducing the nitrogen content of the product natural gas to 2 to 5 mole nitrogen in addition the rejected nitrogen stream will contain only 2 to 5 mole methane providing very high methane recovery the process can also handle co 2 concentrations in the feed gas as high as 1000 to 2000 vppm without freeze up depending on the hydrocarbon content of the feed gas an embodiment of the invention is shown in fig1 natural gas is pretreated by known methods remove water acid gases such as carbon dioxide and hydrogen sulfide and optionally a portion of the heavier hydrocarbons if present to yield feed stream 1 containing predominantly nitrogen and methane this stream is obtained from the pretreatment step preferably at a pressure of at least 250 psia feed gas stream 1 is cooled in feed cooler 101 to a temperature near the hydrocarbon dew point of the feed gas mixture and cooled feed gas stream 3 passes to feed drum 103 which is part of dephlegmator 105 cooled feed gas from feed drum 103 then passes upward through line 5 to rectifying heat exchanger 107 which is also part of dephlegmator 105 in heat and mass transfer flow passage 7 which is representative of a plurality of related heat and mass transfer flow passages in common service the cooled feed gas is further cooled in upward flow by indirect heat transfer against one or more warming process streams later defined partially condensed and rectified to yield nitrogen rich overhead stream 9 and a methane rich liquid which flows downward through passage 7 and.