The method involves pressuring a retort, which encloses predetermined number of packages, to a first pressure through supply of gaseous pressurization medium e.g. air with low moisture content. The packages and the products are supplied with a heating medium, before the pressure in the retort is increased to a second pressure. At the final phase of the process, the pressure in the retort is reduced such that pressure in the package is higher than or equal to the pressure within the retort but outside the package.