Previous studies suggest that Paneth cells are involved in NEC development. Defensin alpha 6 (DEFA6) and guanylate cyclase activator 2A (GUCA2A) are selective protein markers of Paneth cells. The objective was to explore DEFA6 and GUCA2A expression in intestinal tissue samples from newborn infants with and without NEC. Tissue samples from histologically intact intestine were analyzed from 70 infants: 43 underwent bowel resection due to NEC and 27 controls were operated due to conditions such as intestinal atresia, dysmotility, aganglionosis, pseudo-obstruction or volvulus. Each tissue sample was immunohistochemically stained for DEFA6 and GUCA2A. Semi-automated digital image analysis was performed to determine protein expression. Clinical data and protein expressions were compared between the groups. DEFA6 expression was lower in the NEC group (p= 0.006). Low DEFA6 correlated with risk of developing NEC in a logistic regression analysis, independently of gestational age and birth weight (OR 0.843 [CI 0.732–0.971];p= 0.018). GUCA2A expression did not differ between the two groups.Conclusion: Lower expression of DEFA6 together with intact GUCA2A expression indicates that NEC patients have well-defined Paneth cells but diminished defensin activity. Our results suggest that DEFA6 could be used as a biomarker for NEC.What is Known:•Previous studies of defensin activity in NEC have been inconsistent, showing that defensin levels may be increased or diminished in NEC. GUCA2A has to our knowledge never been studied in NEC.What is New:•This study benchmarks two specific Paneth cell markers (DEFA6 and GUCA2A) and their activity in individuals with and without NEC.•The key finding is that the NEC group had a lower DEFA6 expression compared to the Controls, while the expression of GUCA2A did not differ between the groups.Supplementary InformationThe online version contains supplementary material available at 10.1007/s00431-023-04907-3.