A device for sterilization in production of packages (8) is adapted for sterilization with a gaseous sterilizing agent which is kept in the gaseous phase throughout the sterilization process. The device comprises a heating zone (2), a sterilization zone (3) and a venting zone (4). It further comprises means for maintaining a higher pressure in the sterilization zone (3) than in the heating zone (2) and venting zone (4). A method of sterilizing packages (8) in production of the packages (8) is also disclosed. The packages (8) have an open end (11) and a closed end (12) A gaseous sterilizing agent is used and kept in the gaseous phase throughout the sterilization process. A positive pressure is maintained in a sterilization zone (3) in which the sterilization is performed.