The technique is called amniocentesis. It involves the insertion of a needle through the abdominal wall and into the uterus to collect a small sample of the amniotic fluid surrounding the fetus. This sample can then be analyzed to determine the fetal gender or to detect chromosomal abnormalities such as Down syndrome.