The invention concerns a locking system for locking a medical device 2 at a holding structure 1, wherein the medical device and the holding structure are each provided with retaining structures which can cooperate with one another. In order to secure such a medical device when it is connected to a holding structure so that inadvertent removal thereof is avoided when it still operates, either alone or in combination with other medical devices, the locking system according to the present invention is provided with • a first retaining lock (66) for retaining the medical device (6) when connected to the holding structure, wherein the first retaining lock is movable by a first manual control mechanism (69, 68, 67) between a retaining position, in which the first retaining lock retains the medical device on the holding structure to which it is connected, and an free position, in which the first retaining lock does not retain the medical device on the holding structure to which it is connected • a security lock (692) which is movable by an automatic control device (693) between an inactive position and an active position, wherein the security lock, in the active position, prevents the medical device from being removed from the holding structure to which it is connected, and in the inactive position, the security lock does not prevent the medical device from being removed from the holding structure to which it is connected. • This security lock is controlled by the electronic control unit in charge of the control of the operation of the medical device either alone or in combination with other medical devices. There is no more human error possible.La présente invention concerne un système de blocage destiné à bloquer un dispositif médical (2) au niveau dune structure de support (1), le dispositif médical et la structure de support étant chacun dotés de structures de retenue qui peuvent coopérer les unes avec les autres. En vue de fixer un tel dispositif médical lorsquil est