A process for producing ammonia from air and water comprises producing nitrogen gas from air by pressure-swing-adsorption; producing hydrogen gas by electrolysis of water; compressing the nitrogen gas in a first cylinder to produce pressurized nitrogen gas; compressing the hydrogen gas in a second cylinder to produce pressurized hydrogen gas; compressing a mixture of the pressurized nitrogen and hydrogen gases in a third cylinder; heating the compressed mixture in the presence of a catalyst to react nitrogen and hydrogen to form ammonia; and extracting the ammonia from the mixture. A system for producing ammonia in the above process is also provided.