A device for sterilization of packages and a method of sterilizing packages are provided. The device comprises a gassing zone for exposing the packages to a gaseous sterilization agent, inlet mechanisms for introducing the gaseous sterilization agent into the gassing zone and a conveyor for transporting the packages through the gassing zone in a transport direction. The device also includes a separation mechanism arranged inside the gassing zone to divide at least an upper part of the gassing zone into sub gassing zones, each of said separation mechanisms having an opening for passage of the packages, each of at least a number of the inlet mechanisms being arranged to provide a flow of the gaseous sterilization agent at the opening of a respective one of the separation mechanisms.