A gas turbine engine for an aircraft comprises a high-pressure (HP) spool comprising an HP compressor and a first electric machine driven by an HP turbine; a low-pressure (LP) spool comprising an LP compressor and a second electric machine driven by an LP turbine; a combustion system comprising a fuel metering unit; and an engine controller configured to, in response to a change of a power lever angle setting indicative of a deceleration event, reduce fuel flow to the combustion system by the fuel metering unit, and to operate the first electric machine in a generator mode to reduce the HP spool rotational speed and engine core mass flow.