A locking device for a device for varying valve timing of gas exchange valves of an internal combustion engine, including for a vane-type adjusting device, said locking device comprising a drive pinion (3) configured as an outer rotor and connected in driving relationship to a crankshaft of the internal combustion engine by a traction means, said drive pinion having a hollow space (8) defined by a circumferential wall (4) and two side walls (6, 7), and a winged wheel (9) inserted into this hollow space (8) and configured as an inner rotor which is connected rotationally fast to a camshaft (2) of the internal combustion engine, said winged wheel (9) comprising on the periphery (10) of its wheel hub (11) at least one wing (13) that is arranged in an axial groove (12) and extends radially away from the wheel hub (11), at least one working chamber (20) being defined within the hollow space (8) of the drive pinion (3) by intermediate walls (16) that start from the inner surface (5) of the circumferential wall (4) of the drive pinion (3) and extend toward the central longitudinal axis of the device (1), said working chamber (20) being divided by a wing (13) of the winged wheel (9) extending in each working chamber (20) into two hydraulic pressure chambers (21, 22) which, by an optional successive or simultaneous pressurizing by a hydraulic pressure medium, effect a turning or fixing of the winged wheel (9) relative to the drive pinion (3), while in the absence of pressure loading of one of the pressure chambers (21 or 22), the winged wheel (9) and the drive pinion (3) can be coupled to each other mechanically in at least one preferred position, characterized in that a mechanical coupling between the winged wheel (9) and the drive pinion (3) of the device (1) is established by at least one wing (13) of the winged wheel (9), which wing (13) is configured both as a pivoting element of the winged wheel (9) and as a locking element which is arrested in a locking position on the drive pinion (3) when a pressure of the hydraulic pressure medium falls short of a pressure required for pivoting the winged wheel (9), and which is arrested in a releasing/pivoting position within its working chamber (20) when a defined value of hydraulic pressure medium pressure is exceeded.