NEW YORK — Forty medical experts at a New York hospital Friday successfully separated conjoined twins attached at the head after a 20-hour procedure.

Officials at Brooklyn’s Montefiore Medical Center said the 13-month-old boys, Jadon and Anias McDonald, were recovering from the marathon surgery that ended about 2 a.m., hospital officials said.

The twins have “a long road of recovery and rehabilitation ahead of them,” they said.

Their mother, Nicole McDonald, posted a picture of the first twin on Facebook while the second was still undergoing surgery. She said the atmosphere at the hospital was “one of celebration mixed with uncertainty.”

She said Jadon did better than Anias during the procedure, adding that doctors predict he may not be able to move part of his body at first.

The medical team included experts in the fields of nursing, anesthesiology, neuroradiology, neurosurgery, and plastic surgery, led by pediatric neurosurgeon Dr. James Goodrich and plastic and reconstructive surgeon Dr. Oren Tepper.

In 2004, Goodrich also successfully separated Carl and Clarence Aguirre and a half dozen other sets of twins from around the world.

“The entire Montefiore community is grateful for the trust the family has put in our dedicated and pioneering team,” the hospital said in a statement.