An ECU switches a combustion mode of an HCCI engine from HCCI combustion
to spark ignition combustion. The ECU executes the following operations
a) and b) before switching an intake lift amount from a first intake lift
amount to a second intake lift amount: a): switching an exhaust lift
amount from a first exhaust lift amount to a second exhaust lift amount
while ensuring an internal EGR amount, and b): delaying a closing timing
of an exhaust valve so as to reduce the internal EGR amount after
switching the exhaust lift amount from the first exhaust lift amount to
the second exhaust lift amount.