Automatic machine for closing containers, including an automatic corking unit, a conveyor including an inlet section for feeding containers to be corked towards the automatic corking unit and an outlet section for moving apart the corked containers from the corking unit, an injection unit arranged upstream of the corking unit, arranged for injecting inert gas in the head portions of the containers to be corked, a casing defining a chamber which contains the injection unit and the corking unit and a feeding system of inert gas for maintaining within said chamber an inert gas atmosphere.