And yet, as the state Legislature hurtles toward the end of its first Democrat-led session in nearly a decade, the bill’s success is anything but certain.

Long-serving female lawmakers have spoken out against it. Prominent feminists, including Gloria Steinem, have denounced it. Women’s rights scholars have argued that paid surrogacy turns women’s bodies into commodities and is coercive to poor women given the sizable payments it can bring.

With just one week remaining in this year’s legislative session, what supporters have presented as an obvious move — 47 other states permit surrogacy — has turned into an emotional debate about women’s and gay rights, bodily autonomy and New York’s reputation as a progressive leader.

The bill has the support of Gov. Andrew M. Cuomo, and passed the state Senate on Tuesday. But it remains stalled in the Assembly, where several prominent female lawmakers have expressed firm opposition.

Assemblywoman Deborah Glick, who became the first openly gay member of the Legislature in 1991, said surrogacy rights were not the only marker for equality. “I’m not certain that, considering the money involved, that this is an issue for the broader LGBT community,” she said. “This is clearly a problem for the extraordinarily well-heeled.”

Surrogacy arrangements in the United States cost from $20,000 to more than $200,000, according to a report from Columbia Law School.

Glick added, “It is pregnancy for a fee, and I find that commodification of women troubling.”

But Sen. Brad Hoylman, one of the bill’s sponsors, said the legislation showed “the importance of the LGBTQ community to the state of New York.”

“I think that’s a mark of progress for our community and a mark of progress for human rights in general,” said Hoylman, who is the state’s only openly gay senator and has two daughters born through surrogacy in California.

The debate over surrogacy rights is relatively new, as it is inherently entwined with advances in reproductive technology. Its roots are in the infamous Baby M case, when Mary Beth Whitehead, a woman in New Jersey, answered a newspaper ad in 1984 to be a surrogate for a couple, Elizabeth and William Stern.

But after Whitehead gave birth to a girl, known in court papers as Baby M, she changed her mind: She wanted to keep the baby, who was biologically her daughter, as she had used her own egg for the pregnancy. A protracted legal battle ensued, and the New Jersey Supreme Court eventually ruled that surrogacy contracts went against public policy. The Sterns won custody of the baby.

In the wake of that case, many states, including New York, banned surrogacy. But that trend has reversed in recent years. Washington state and New Jersey legalized paid surrogacy last year, joining about a dozen other states. Many other states allow it under certain circumstances or have no laws on the topic, effectively permitting it.

Between 1999 and 2014 in the United States, more than 18,400 infants were born through gestational surrogacy, where the carrier is not related to the fetus. Of those, 10,000 were born after 2010, according to data from the Centers for Disease Control and Prevention.

Yet the opposite has happened internationally. Surrogacy is illegal in most of Europe. And India — where “fertility tourism” brought in $400 million a year — outlawed commercial surrogacy last year, over exploitation concerns.

That was the concern outlined by Steinem in a letter to Cuomo several months ago, opposing the New York bill. In a new message being distributed to lawmakers this week, Steinem wrote that legalizing surrogacy would put “disenfranchised women at the financial and emotional mercy of wealthier and more privileged individuals” and allow “profiteering from body invasion.”

In a sign of how divisive the issue was, Sen. Liz Krueger, one of the most outspoken progressive members of the Legislature, voted against the bill.

“I do understand the issue of having trouble with fertility. I myself couldn’t have children,” Krueger said on the Senate floor. But, she said, “you’re buying and selling eggs, and you’re renting wombs.”

This article originally appeared in The New York Times.