Gametogenesis and fertilization are complex biological processes. Gametogenesis involves the formation of gametes, or sex cells, through meiosis. This results in haploid cells containing half the number of chromosomes. In males, spermatogenesis occurs in the testes to produce sperm. In females, oogenesis occurs in the ovaries to produce eggs. Fertilization usually takes place when an egg is fertilized by sperm in the fallopian tubes, restoring the diploid number of chromosomes. Any errors during gametogenesis or fertilization can result in chromosomal abnormalities.