A method, for purposes of extending its shelf-life, of heat-treating a food which is packed in a packaging container (10) of a packaging laminate comprising a layer of paper or paperboard and outer, liquid-tight coatings of plastic. The packaging container (10) is exposed to a liquid heating medium, e.g. hot steam, which is sprayed against the outer walls of the packaging container (10) in order to heat and hold the food at a predetermined treatment temperature, e.g. 80-140 C, during a predetermined period of time so as to exterminate, eliminate or deactivate harmful microorganisms inside the packaging container (10). Thereafter, the food is cooled by means of cold water which is sprayed against the outer walls of the packaging container (10). In order to avoid the risk that liquid penetrate into exposed incision edges on the outside of the packaging container (10) during the heat treatment, the packaging container (10), before this treatment, is brought into contact with a hydrophobic impregnation agent for absorption and penetration of the hydrophobic impregnation agent in the exposed incision edges.