A controller for controlling behavior of a motorcycle, the controller comprising: a control amount setting section that sets a control amount in automatic cruise operation; and an execution section that makes the motorcycle execute the automatic cruise operation corresponding to the control amount set in the control amount setting section, and further comprising: a mode change section that changes a mode to a first mode in a state where a temperature of a rear-wheel friction brake mechanism as a friction brake mechanism for a rear wheel of the motorcycle is lower than a first prescribed temperature or to a second mode in a state where the temperature of the rear-wheel friction brake mechanism is higher than the first prescribed temperature during automatic deceleration in the automatic cruise operation, wherein the control amount setting section changes the control amount in accordance with the mode change in the mode change section, and in the case where a braking force generated on the rear wheel in the first mode and the braking force generated on the rear wheel in the second mode are compared under a condition that the same deceleration is generated in the motorcycle by the automatic deceleration, in a state where the deceleration is at least less than a first reference amount, the braking force generated on the rear wheel in the second mode is smaller than the braking force generated on the rear wheel in the first mode. a control amount setting section that sets a control amount in automatic cruise operation; and an execution section that makes the motorcycle execute the automatic cruise operation corresponding to the control amount set in the control amount setting section, and further comprising: a mode change section that changes a mode to a first mode in a state where a temperature of a rear-wheel friction brake mechanism as a friction brake mechanism for a rear wheel of the motorcycle is lower than a first prescribed temperature or to a second mode in a state where the temperature of the rear-wheel friction brake mechanism is higher than the first prescribed temperature during automatic deceleration in the automatic cruise operation, wherein the control amount setting section changes the control amount in accordance with the mode change in the mode change section, and in the case where a braking force generated on the rear wheel in the first mode and the braking force generated on the rear wheel in the second mode are compared under a condition that the same deceleration is generated in the motorcycle by the automatic deceleration, in a state where the deceleration is at least less than a first reference amount, the braking force generated on the rear wheel in the second mode is smaller than the braking force generated on the rear wheel in the first mode. a mode change section that changes a mode to a first mode in a state where a temperature of a rear-wheel friction brake mechanism as a friction brake mechanism for a rear wheel of the motorcycle is lower than a first prescribed temperature or to a second mode in a state where the temperature of the rear-wheel friction brake mechanism is higher than the first prescribed temperature during automatic deceleration in the automatic cruise operation, wherein the control amount setting section changes the control amount in accordance with the mode change in the mode change section, and in the case where a braking force generated on the rear wheel in the first mode and the braking force generated on the rear wheel in the second mode are compared under a condition that the same deceleration is generated in the motorcycle by the automatic deceleration, in a state where the deceleration is at least less than a first reference amount, the braking force generated on the rear wheel in the second mode is smaller than the braking force generated on the rear wheel in the first mode.