A target air amount for achieving a requested torque is back-calculated from the requested torque using a virtual air-fuel ratio. The virtual air-fuel ratio is changed from a first air-fuel ratio to a second air-fuel ratio in response to a condition for switching an operation mode from operation in the first air-fuel ratio to operation in the second air-fuel ratio being satisfied. After the virtual air-fuel ratio is changed from the first air-fuel ratio to the second air-fuel ratio, an interval of time passes and the target air-fuel ratio is then switched from the first air-fuel ratio to a third air-fuel ratio that is an intermediate air-fuel ratio between the first air-fuel ratio and the second air-fuel ratio. The target air-fuel ratio is temporarily held at the third air-fuel ratio, and is thereafter switched from the third air-fuel ratio to the second air-fuel ratio.