Wishing to avoid that suffering, she chose to terminate her pregnancy. But because she could not do that in New York, she had to fly to Colorado, ill and despondent, where one of the few doctors in the country who provides the kind of treatment she needed administered a shot, that caused the baby’s heart to stop beating. She then had to fly several hours back to New York to deliver it stillborn. Abortion law in New York is inscribed in the penal code, making it a matter of criminality rather than a matter of public health, which it turn leaves doctors fearful of conducting the procedure late in a woman’s pregnancy.

Cynthia Nixon, who is challenging Governor Andrew M. Cuomo in the Democratic primary, has stressed the need to bring state statute up-to-date, so that no matter what happens nationally, abortion law in New York would enshrine the protections offered in Roe v. Wade.

Mr. Cuomo has been making the same argument for years, and aggressively so since the announcement of Mr. Kavanaugh’s nomination. He has held rallies and released ads attesting to his commitment to women and reproductive rights. He has the support of Planned Parenthood. On Wednesday he said that if Roe v. Wade were overturned, he would “sue.” What or whom he would sue was not obvious, but what is clear is that Mr. Cuomo is ferociously aiming to persuade the electorate that his feminism is sacrosanct, joking on Monday that God told him he was a feminist “when he gave me three daughters.”

Speaking at the rally in Union Square, Ms. Nixon ridiculed the remark, prompting a woman in the audience to shout, “No, she didn’t!” to roaring cheers. Fiscally centrist, Mr. Cuomo was always going to be vulnerable to challenges that he was insufficiently liberal on economic issues. But the prospect of a new, conservative justice on the Supreme Court exposes the weaknesses of a law that he has, during two terms, failed to generate enough support to change, leaving him open to the charge that he is on the vanguard of socially progressive causes only at the level of rhetoric.

Mr. Cuomo, for too long, enabled the now-disbanded Independent Democratic Conference, a group of eight breakaway Democrats in the State Senate who caucused with Republicans, making passage of a more forward-thinking abortion law impossible. His campaign argues that even before he was in office, in 2008, for example there was not even enough support among mainline Democrats in the Legislature for passage. “He is not a magician,’’ a spokeswoman for the governor’s re-election bid told me.