A health care provider can diagnose this condition during a physical exam. Imaging tests may be ordered.

The infant should be checked for other problems, such as abnormalities of the genitals, urinary tract, and spine.

Surgery to correct the defect is needed. If the rectum connects with other organs, these organs will also need to be repaired. A temporary colostomy (connecting the end of the large intestine to the abdomen wall so that stool can be collected in a bag) is often needed.