A crucial event that determines whether the embryo will develop into a male or female occurs in the second half of week six.
If the Y chromosome is present in the embryo's cells, a gene within the short arm of the chromosome called SRY will turn on, initiating a chemical chain reaction that will turn on other genes and stimulate the production of male hormones. If the X chromosome is present, or if the SRY gene is missing from the Y chromosome, the embryo will develop into a female via mechanisms that are not fully understood.
Note: SRY stands for sex-determining region of the Y chromosome.