A controller for an internal combustion engine has a hydraulic valve
characteristic changing mechanism for changing valve operating
characteristics of suction and exhaust valves; a valve system provided
with a hydraulic valve phase variable mechanism that changes the phase; a
map that stores a fuel injection quantity and an ignition timing in
response to the valve operating characteristics; and delay time setting
means for setting a delay time required to complete changeover of the
valve operating characteristics, based on operating oil properties
detected from behavior of a valve phase variable mechanism, to change the
map after the delay time has elapsed. Thus, a valve operating
characteristic changing timing coincides with a map changing timing to
thereby achieve an improved performance of the internal combustion engine.