The procedure is typically performed between the 15th and 20th weeks of pregnancy. Under the guidance of ultrasound, a thin needle is inserted through the abdominal wall and into the amniotic sac. A small sample of amniotic fluid is then withdrawn and sent to a laboratory for analysis.