a device for preventing overfilling of containers , such as those intended to contain liquefied gases , includes a valve body in which a gas duct is defined and a closure . the closure is axially movable in the valve body away from and towards a valve seat in order to respectively open and shut off the gas duct . an actuator , capable of exerting a thrust , urges the closure away from the seat . the actuator includes a float , a cam mechanism and a lever mechanism . the cam mechanism exerts the thrust in an ascending phase of the float until a preimposed limit position corresponding to a maximum filling level is reached . the lever mechanism exerts the thrust in at least a first part of a descending phase of the float starting from the limit position .