A process for producing liquid nitrogen, the process comprising the steps of: • providing a residual gas stream, wherein the residual gas stream is sourced from a retentate stream of a cold membrane, wherein the residual gas stream at a pressure greater than 13 bara comprises nitrogen, argon, oxygen, and carbon dioxide; • purifying the residual gas stream in a front-end purification unit to remove carbon dioxide, thereby forming a purified residual gas stream; • compressing the purified residual gas stream in a first compressor to form a pressurized residual gas stream; • introducing the pressurized residual gas stream to a cold box, wherein a first portion of the pressurized residual gas stream is cooled in a main heat exchanger, expanded within the cold box, and then fed to a distillation column system for separation therein, thereby forming a nitrogen stream and a waste stream; • withdrawing the waste stream from the distillation column system and warming said waste stream; and • withdrawing the nitrogen enriched stream from the distillation column and compressing the nitrogen stream in a second compressor before liquefying the nitrogen stream within the cold box to produce a liquid nitrogen stream, wherein a second portion of the pressurized residual gas stream is partially cooled in the main heat exchanger and then expanded in first and second turbines (60,80), having each an inlet temperature which is an intermediate temperature of the main heat exchanger, wherein the first turbine has a warmer inlet temperature as compared to the second turbine the turbines being configured to provide sufficient cooling energy to liquefy the nitrogen stream wherein the residual gas stream is derived from a flue gas stream from a power plant wherein the first and second turbines (60,80) operate in series, wherein the first turbine is configured to drive the first compressor, wherein the second turbine is configured to drive the second compressor and wherein the purified residual gas stream and the nitrogen enriched stream are compressed without the use of any externally-powered compressors. • providing a residual gas stream, wherein the residual gas stream is sourced from a retentate stream of a cold membrane, wherein the residual gas stream at a pressure greater than 13 bara comprises nitrogen, argon, oxygen, and carbon dioxide; • purifying the residual gas stream in a front-end purification unit to remove carbon dioxide, thereby forming a purified residual gas stream; • compressing the purified residual gas stream in a first compressor to form a pressurized residual gas stream; • introducing the pressurized residual gas stream to a cold box, wherein a first portion of the pressurized residual gas stream is cooled in a main heat exchanger, expanded within the cold box, and then fed to a distillation column system for separation therein, thereby forming a nitrogen stream and a waste stream; • withdrawing the waste stream from the distillation column system and warming said waste stream; and • withdrawing the nitrogen enriched stream from the distillation column and compressing the nitrogen stream in a second compressor before liquefying the nitrogen stream within the cold box to produce a liquid nitrogen stream,