Because it is illegal to pay a surrogate in New York, Mr. Towers’s quest to become a father began all the way across the country. Through an agency in Portland, Ore., Northwest Surrogacy Center, he found a woman there who was willing to carry a fertilized embryo. The embryo itself was made with the eggs of an anonymous donor from an agency based in California. These eggs (which, according to the agency, came from an astrophysicist) were fertilized at Oregon Reproductive Medicine, a clinic in Portland.

After a failed transfer of a single embryo, Mr. Towers and his surrogate decided to transfer two embryos in hopes that at least one would take. They knew it could mean twins.

“I realized I couldn’t control everything,” Towers said. “I left it to fate at that point.”

Nine months later, he traveled to Portland for the surrogate’s scheduled C-section and held his sons, Asher and Galen, for the first time. Asher had a short stay in the intensive care unit, so Mr. Towers stayed in Oregon for three more weeks, until the twins were ready for the long flight home to New York.

As unpredictable as the medical prospect of surrogacy may be, some gay men prefer that to the possibility of facing discrimination in adoption.

Dennis Williams had his son, Elan, via surrogacy four years ago. Mr. Williams, who is 46 and black, said he chose surrogacy because the prospect of persuading a woman to allow him to adopt was daunting. “As a single, gay black man,” he said, “I figured I’d be at the bottom of the list for most women.”

Mr. Williams and his former partner had a failed egg donation from a woman they met through a friend. After he and his partner broke up, Mr. Williams still wanted to be a father. The donor, a black lesbian who didn’t plan on having children, agreed to try again for Mr. Williams.