One of the critical events in sexual differentiation occurs in the seventh week. Embryos which contain the Y chromosome have a specific gene known as SRY. This gene for a testes determining factor (TDF) determines the path of formation of testes. SRY is expressed in the mesenchyme and is expressed immediately. SRY will always cause a cascade of events leading to the formation of internal male organs. This means that it is possible to have an individual with female external organs and male internal organs, if the SRY gene were to be expressed on one of the X chromosomes.
The first step in the development of the testes is the formation of the tunica albuginea, a layer of fibrous connective tissue which separates the sex cords (now known as seminiferous cords) from the surface epithelium. As such, in the male SRY causes the medulla of the developing gonad to be very well-developed while the cortex is not. Within the tunica albuginea, the seminiferous cords are separated from one another by mesenchyme. This mesenchyme will go on to produce the Leydig cells.
Leydig cells are important as they produce testosterone which travels to receptors in the mesonephric duct. This maintains the presence of these mesonephric ducts (as opposed to the female embryo where the duct degenerates). Meanwhile, the renal corpuscle is degenerating, which allows the tubules of the mesonephros to hook up to the rete testis. This results in formation of the ductuli efferentes. These tubules are continuous with the mesonephric duct, which is now known as the epididymis.
The seminiferous cords also have an important role in male differentiation. The cords are solid (i.e. no lumen) until puberty but they are made up of a large number of Sertoli cells, a highly proliferative cell which secretes antimullerian hormone. Antimullerian hormone inhibits the paramesonephric ducts which then degenerate around the ninth week of development. The seminiferous cords remain solid until puberty at which time a lumen develops and they become the seminiferous tubules.