Variation in obsessive–compulsive symptoms (OCS) has a heritable basis, with genetic association studies starting to yield the first suggestive findings. We contribute to insights into the genetic basis of OCS by performing an extensive series of genetic analyses in a homogeneous, population-based sample from the Netherlands. First, phenotypic and genetic longitudinal correlations over a 6-year period were estimated by modeling OCS data from twins and siblings. Second, polygenic risk scores (PRS) for 6931 subjects with genotype and OCS data were calculated based on meta-analysis results from IOCDF-GC, to investigate their predictive value. Third, the contribution of measured single nucleotide polymorphisms (SNPs) to the heritability was estimated using random-effects modeling. Last, we performed an exploratory genome-wide association study (GWAS) of OCS, testing for SNP- and for gene-based associations. Stability in OCS (test–retest correlation 0.63) was mainly explained by genetic stability. The PRS based on clinical samples predicted OCS in our population-based twin-family sample. SNP-based heritability was estimated at 14%. GWAS revealed one SNP (rs8100480), located within the MEF2BNB gene, associated with OCS (P=2.56 × 10−8). Additional gene-based testing resulted in four significantly associated genes, which are located in the same chromosomal region on chromosome 19p13.11: MEF2BNB, RFXANK, MEF2BNB-MEF2B and MEF2B. Thus, common genetic variants explained a significant proportion of OCS trait variation. Genes significantly associated with OCS are expressed in the brain and involved in development and control of immune system functions (RFXANK) and regulation of gene expression of muscle-specific genes (MEF2BNB). MEF2BNB also showed a suggestive association with OCD in an independent case–control study, suggesting a role for this gene in the development of OCS.