A method of processing stranded gas containing methane comprising the steps of:
- removing hydrogen sulfide from the gas;
- compressing the gas;
- cooling the gas;
- removing water, non methane organic compounds, and volatile organic compounds using one or more pressure swing adsorption units;
- removing carbon dioxide and oxygen using process membranes;
- and
- removing nitrogen and oxygen using one or more pressure swing adsorption units;
- wherein the step of removing carbon dioxide and oxygen using process membranes produces permeate which is then used in the step of recycling the gas to improve methane recovery.