To improve the responsiveness of advance/retard operation within a range that the viscosity of oil supplied to a variable valve timing device (VCT) with an intermediate lock mechanism is high.
It is determined whether or not a phase retaining hydraulic-pressure securing condition for securing hydraulic pressure retaining a VCT phase during idling is satisfied according to whether a predetermined time elapses after starting, and cooling water temperature (or oil temperature) is a determination threshold or below. When the phase retaining hydraulic pressure securing condition is satisfied, the VCT phase (in the vicinity of an intermediate lock phase) during idling is retained as it is without performing the lock control (lock operation of the intermediate lock mechanism). Even if the phase retaining hydraulic pressure securing condition is satisfied, when engine rotation fluctuation (or VCT phase fluctuation) is a predetermined value or larger during idling, it is determined that the VCT phase is not retained in the vicinity of the intermediate lock phase, and the lock control is performed to suppress the deterioration of idling stability.