One of the byproducts of generating ammonia is carbon dioxide.
(Someone's surely going to chime in with "Yeah, but where does the electricity come from?" ... I never said it was a free lunch [petroleum isn't either, btw] but there are obviously ways to generate electricity that don't involve oil or gas.)