NOVELTY - Separation of nitrogen and/or carbon dioxide from a natural gas feed stream and recovery of hydrocarbons from the feed stream, includes passing the gas feed stream to a first pressure swing adsorption unit having an adsorbent selective for nitrogen and/or carbon dioxide; passing a low pressure waste stream to a second adsorption unit having hydrocarbon-selective adsorbent; and directing a methane-containing stream to the second adsorption unit.    USE - For separating nitrogen and/or carbon dioxide from a natural gas feed stream and recovering hydrocarbons from the feed stream.    ADVANTAGE - The inventive method achieves high system natural gas liquid (58) recovery. It also increases the overall recovery of methane.    DETAILED DESCRIPTION - Separation of nitrogen and/or carbon dioxide from a natural gas feed stream and recovery of hydrocarbons from the feed stream, includes passing the natural gas feed stream (30) to a first pressure swing adsorption unit (32) containing an adsorbent selective for nitrogen and/or carbon dioxide to preferentially adsorb nitrogen and/or carbon dioxide from the feed stream and produce a first product stream (34) enriched with methane and a low pressure waste stream (35) having a higher molar concentration of nitrogen and/or carbon dioxide than the feed stream; passing the waste stream to a second adsorption unit (40) containing a hydrocarbon-selective adsorbent to preferentially adsorb the co-adsorbed hydrocarbons to produce a second product stream enriched with nitrogen and/or carbon dioxide; and directing a methane-containing stream to the second adsorption unit to purge the hydrocarbon-selective adsorbent and produce a combined stream of methane and the co-adsorbed hydrocarbons adsorbed by the hydrocarbon-selective adsorbent. The waste stream further contains a portion of the hydrocarbons contained in the feed stream. It has been co-adsorbed on the adsorbent.    DESCRIPTION OF DRAWING(S) - The figure represents a schematic of a process for the removal of nitrogen and carbon dioxide from natural gas and the recovery of natural gas liquid components.    Natural gas feed stream (30)    First pressure swing adsorption unit (32)    First product stream (34)    Low pressure waste stream (35)    Second adsorption unit (40)    Natural gas liquid (58)