A method of and a device for marking a product in a container (1) is described. The method comprises the steps of feeding the product to an inner space of the container during an open state of the container, providing marking means (4) comprising at least a first traceable substance, and closing the container to a closed state, which sealingly encloses the product and the marking means in the inner space of the container. Furthermore, the method comprises the further step of introducing the first traceable substance into the inner space of the container after the container has reached the closed state, thereby distributing the first traceable substance onto the product to mark the product, thereby finishing the marking of the product and permitting later opening of the container to the open state, whereafter the product is identifiable through the marking.