A gas turbine engine includes a cracking device that is configured to decompose an ammonia flow into a flow that contains more hydrogen (H2) than ammonia (NH3), a first separation device that separates hydrogen downstream of the cracking device, wherein residual ammonia and nitrogen are exhausted as a residual flow. The separated flow contains more hydrogen than ammonia, and nitrogen is exhausted separately as a hydrogen flow. A combustor is configured to receive and combust the hydrogen flow from the separation device to generate a gas flow. A compressor section is configured to supply compressed air to the combustor. A turbine section is in flow communication with the gas flow produced by the combustor and is mechanically coupled to drive the compressor section.