An injector for transcutaneously introducing a sensor into a patient, including a cannula, a base element, a sliding element arranged displaceably on the base element, for transcutaneously introducing the cannula into the patient in an injection direction, and including an ejection element for automatically pulling the cannula out of the patient counter to the injection direction by the ejection element in an ejection operation. The injector has a locking element for the ejection element such that, in a delivery state, the ejection element is lockable in an energy-charged state, and the sliding element and the locking element are configured to interact indirectly or directly in order, in an injection state, when the cannula is introduced transcutaneously into the patient, to release the locking of the ejection element in order automatically to start the ejection operation.