Lock cylinder comprising: a stator; a rotor, which is mounted in the stator such that it can be rotated about a first axis of rotation; and an arresting device, which is mounted in the stator; wherein the arresting device comprises an arresting pin, a driver, which interacts with the arresting pin, and a drive device, which acts on the arresting pin via the driver, and wherein the arresting pin can be displaced by the drive device along an arresting direction into an arresting position, in which rotation of the rotor about the first axis of rotation is prevented, and along a released direction, which is counter to the arresting direction, into a release position, in which rotation of the rotor about the first axis of rotation is possible, wherein the lock cylinder also has at least one sensor unit for sensing the position of the arresting pin, characterized in that the sensor unit has at least one active sensor part and at least one passive sensor part, wherein the active sensor part has a sensing region, and wherein the passive sensor part can be sensed by the active sensor part when the passive sensor part is located in the sensing region of the active sensor part, and wherein the active sensor part can emit a sensor signal to a control means and/or to the drive device and in that precisely one single one of the said passive sensor parts is arranged on the arresting pin, and in that at least two, in particular precisely two, spaced-apart active sensor parts are arranged on the stator, wherein, in the release position, the said passive sensor part is located in the sensing region of one of the two active sensor parts, and wherein, in the arresting position, the said passive sensor part is located in the sensing region of the other one of the two active sensor parts. a stator; a rotor, which is mounted in the stator such that it can be rotated about a first axis of rotation; and an arresting device, which is mounted in the stator; wherein the arresting device comprises an arresting pin, a driver, which interacts with the arresting pin, and a drive device, which acts on the arresting pin via the driver, and wherein the arresting pin can be displaced by the drive device along an arresting direction into an arresting position, in which rotation of the rotor about the first axis of rotation is prevented, and along a released direction, which is counter to the arresting direction, into a release position, in which rotation of the rotor about the first axis of rotation is possible, wherein the lock cylinder also has at least one sensor unit for sensing the position of the arresting pin, characterized in that the sensor unit has at least one active sensor part and at least one passive sensor part, wherein the active sensor part has a sensing region, and wherein the passive sensor part can be sensed by the active sensor part when the passive sensor part is located in the sensing region of the active sensor part, and wherein the active sensor part can emit a sensor signal to a control means and/or to the drive device and in that precisely one single one of the said passive sensor parts is arranged on the arresting pin, and in that at least two, in particular precisely two, spaced-apart active sensor parts are arranged on the stator, wherein, in the release position, the said passive sensor part is located in the sensing region of one of the two active sensor parts, and wherein, in the arresting position, the said passive sensor part is located in the sensing region of the other one of the two active sensor parts.