NOVELTY - The method comprises feeding a natural gas stream containing impurities to a nitrogen rejection unit such as a vacuum swing adsorption unit, feeding the purified natural gas stream to a liquefier heat exchanger (AA, A1), expanding the liquefied natural gas to a pressure of 1-5 bar and feeding the expanded liquefied natural gas to a flash vessel (AB), flashing the liquid natural gas and separating the liquefied natural gas from the flash gas, recovering refrigeration from the flash gas, and feeding the liquefied natural gas to storage and the flash gas to the nitrogen rejection unit.    USE - The method is useful for recovering liquefied natural gas from a gas mixture containing natural gas and impurities, where the natural gas is a vehicle fuel or a feedstock for the production of hydrogen.    ADVANTAGE - The method is capable of economically and efficiently recovering liquefied natural gas from a gas mixture with high purity and reduced power consumption.    DETAILED DESCRIPTION - The method comprises feeding a natural gas stream containing impurities to a nitrogen rejection unit such as a vacuum swing adsorption unit, feeding the purified natural gas stream to a liquefier heat exchanger (AA, A1), expanding the liquefied natural gas to a pressure of 1-5 bar and feeding the expanded liquefied natural gas to a flash vessel, flashing the liquid natural gas and separating the liquefied natural gas from the flash gas, recovering refrigeration from the flash gas, and feeding the liquefied natural gas to storage and the flash gas to the nitrogen rejection unit. The impurities consist of water, carbon dioxide, non-methane organic compounds, and sulfur compounds. The nitrogen is recovered from the nitrogen rejection unit. The pressure in the liquefier heat exchanger is 6-30 bar. The flash gas is richer in nitrogen than natural gas and recycled to the natural gas feed. The natural gas stream consists of landfill gas and biogas. The flash pressure is lower than storage pressure. The recovered natural gas is fed to a storage unit that is situated horizontally. The recovered refrigeration provides cooling to the heat exchanger. The heat exchanger is present in thermal contact with the liquefier feed. An INDEPENDENT CLAIM is included for an apparatus comprising a nitrogen rejection unit, a liquefier heat exchanger and a flash vessel.    DESCRIPTION OF DRAWING(S) - The figure shows a schematic view of a liquefier.    Cold water return line (62)    Heat exchangers (AA, A1)    Flash tank (AB)    Knockout drum (AD)    Open valves. (V21, V21A, V22, V23, V25, V24, V24A)