Nitrogen gas (N2) delivered in high expansion foam in a closed container could be a feasible method for humanely stunning pigs. This study aimed to evaluate potential aversion in pigs to the N2 foam method and its effect on stun quality. Furthermore, the study aimed to assess potential aversion to the foam itself. Sixty pigs (27.8 ± 4.4 kg) were divided into three treatments and were exposed to either N2-filled foam, air-filled foam, or no foam air. The N2 foam was effective at purging the air from the container and quickly created stable anoxic conditions. The pigs did not show any strong aversive behaviours when exposed to foam. However, they seemed to avoid putting their heads and snouts into the foam when foam levels became high. Escape attempts through the lid also increased when the foam started covering their heads. The mean time to loss of posture was 57.9 s. Based on the results, stunning with the N2 foam technique could be a viable alternative to high concentration CO2 stunning and potentially lead to improved animal welfare at slaughter.