Immune system aberrations are suggested to be an important factor in the pathophysiology of unexplained secondary recurrent pregnancy loss (sRPL). The objective was to investigate if the sex ratio of the firstborn child in sRPL patients differs from the background population and whether the sex of the firstborn child has a negative impact on the pregnancy prognosis alone and/or in combination with carriage of male-specific minor histocompatibility (H-Y) restricting HLA class II alleles. From January 2016 to October 2022, 582 patients with unexplained RPL were admitted to the RPL Center of Western Denmark and continuously followed-up. HLA-DRB1 and -DQB1 typing was performed as part of the routine diagnostic work-up. In sRPL patients, a history of a firstborn boy was significantly more frequent than in the Danish background population and was associated with significantly lower odds of a successful reproductive outcome in the first pregnancy after admission compared to a firstborn girl (OR=0.41, 95% CI: 0.20-0.83, p = 0.014). The odds of a successful reproductive outcome were enhanced in patients carrying ≥ 1 H-Y-restricting HLA class II alleles with a first-born girl compared to a firstborn boy (OR=3.33, 95% CI: 1.40-7.88, p = 0.005), while no difference in successful reproductive outcome was seen in sRPL patients not carrying these alleles (OR=1.20, 95% CI: 0.33-4.43, p = 0.781). The sex ratio of children born after RPL was similar to the Danish background population. These findings confirm previous findings and suggests that a harmful immune response triggered by H-Y-antigen exposure during a previous pregnancy in preconditioned women may cause sRPL.