Method for controlling at least one first turboshaft engine and one second turboshaft engine of a rotorcraft which set a common kinematic linkage in motion respectively via a first output kinematic linkage and a second output kinematic linkage , the first turboshaft engine having a first free turbine connected to the first output kinematic linkage , said rotorcraft having an output electric machine operating on request at least in electrical energy generator mode, being driven by the first output kinematic linkage , the rotorcraft having an input electric machine operating on request at least in motor mode, the input electric machine being connected by an input kinematic linkage to a gas generator of this second turboshaft engine , characterised in that the method comprises a phase (STP1) with optimised specific fuel consumption, comprising the following steps: - supplying (STP1.1) fuel to the first turboshaft engine in order to provide a first non-zero power to said common kinematic linkage , said first power being equal to an original power provided to said common kinematic linkage by the first turboshaft engine prior to an initiation of said phase (STP1) with optimised specific fuel consumption, said output electric machine being inactive prior to said initiation of said phase (STP1) with optimised specific fuel consumption, - operating (STP1.2) the output electric machine in electrical energy generator mode in order to generate electrical energy, - supplying (STP1.3) fuel to the second turboshaft engine and operating the input electric machine in motor mode in order to provide a second non-zero power to said common kinematic linkage , said second power being equal to an initial power provided to said common kinematic linkage by the second turboshaft engine prior to an initiation of said phase (STP1) with optimised specific fuel consumption, said input electric machine being inactive prior to an initiation of said phase (STP1) with optimised specific fuel consumption, neither of the first turboshaft engine and second turboshaft engine idling. - supplying (STP1.1) fuel to the first turboshaft engine in order to provide a first non-zero power to said common kinematic linkage , said first power being equal to an original power provided to said common kinematic linkage by the first turboshaft engine prior to an initiation of said phase (STP1) with optimised specific fuel consumption, said output electric machine being inactive prior to said initiation of said phase (STP1) with optimised specific fuel consumption, - operating (STP1.2) the output electric machine in electrical energy generator mode in order to generate electrical energy, - supplying (STP1.3) fuel to the second turboshaft engine and operating the input electric machine in motor mode in order to provide a second non-zero power to said common kinematic linkage , said second power being equal to an initial power provided to said common kinematic linkage by the second turboshaft engine prior to an initiation of said phase (STP1) with optimised specific fuel consumption, said input electric machine being inactive prior to an initiation of said phase (STP1) with optimised specific fuel consumption, neither of the first turboshaft engine and second turboshaft engine idling. <EOS>