The Wartberg culture (WBC, 3,500-2,800 BCE) dates to the Late Neolithic period, a time of important demographic and cultural transformations in western Europe. We perform a genome-wide analysis of 42 individuals who were interred in a WBC collective burial in Niedertiefenbach, Germany (3,300-3,200 cal. BCE). Our results highlight that the Niedertiefenbach population indeed emerged at the beginning of the WBC. This farming community was genetically heterogeneous and carried a surprisingly large hunter-gatherer ancestry component (40%). We detect considerable differences in the human leukocyte antigen gene pool between contemporary Europeans and the Niedertiefenbach individuals whose immune response was primarily geared towards defending viral infections.