An aircraft (1) having at least one rotor (2) driven by a main gearbox (3), at least one fuel-burning engine (4), an on-board electricity network (7), and at least one electrical machine (10) corresponding to the engine (4) and capable of operating both in electric motor mode and also in electricity generator mode, each electrical machine (10) being mechanically connected to said main gearbox (3) by first connection means (20) and being electrically connected to said on-board electricity network (7). Second mechanical connection means (40) connect each electrical machine (10) mechanically to a gas generator (5) of an engine.