The EFSA Panel on Animal Health and Welfare (AHAW) was asked to deliver a scientific opinion on the use of high‐expansion foam for stunning and killing pigs and poultry. A dossier was provided by the applicant as the basis for an assessment of the extent to which the method is able to provide a level of animal welfare at least equivalent to that ensured by the currently allowed methods for pigs and poultry. According to legislation, to be approved in the EU, new stunning methods must ensure (1) the absence of pain, distress or suffering until the onset of unconsciousness, and (2) that the animal remains unconscious until death. An ad hoc Working Group set up by EFSA performed the assessment as follows: (1) The data provided were checked against the criteria laid down in the EFSA Guidance (EFSA, 2018), and was found to partially fulfil those criteria; (2) extensive literature search; (3) data extraction for quantitative assessment; (4) qualitative exercise based on non‐formal expert elicitation. The assessment led to conclude that it is more likely than not (certainty > 50%–100%) that high‐expansion foam for stunning and killing pigs and poultry, named NEFS in container (Nitrogen Expansion Foam Stunning in container), provides a level of welfare at least equivalent to one or more of the currently allowed methods listed in Annex I of Council Regulation (EC) No 1099/2009. The overall assessment of EFSA is valid only under the technical conditions described in this Opinion for laying hens, broiler chickens of all age and pigs weighing 15–41 kg in situations other than slaughter. The overall assessment of EFSA is that NEFS can be suitable for depopulation using containers for pig and poultry farms respecting the technical conditions and the categories and types of animals defined in this Scientific Opinion.