“The basic thing is, because the killing of the fetus is the same act as the killing of the mother, even though they were separate charges under the old law, you couldn’t get more than 25 to life,” he said.

Prosecutors said surveillance video inside Ms. Irigoyen’s building in Ridgewood showed Mr. Hobson dragging his former girlfriend out of her third-floor apartment to a stairwell, where he stabbed her several times in the torso, neck and abdomen. She later died at a hospital.

Mr. Hobson surrendered to the 104th Precinct on Friday morning with his defense lawyer, Steven J. Questore, who said his client is “committed” to facing the murder charge against him. He would not discuss specifics of the case or say whether Mr. Hobson intended to fight the charge or plead guilty.

Regardless of the charges, Mr. Alonso said, it is unlikely that anyone who commits violence against pregnant women will get off easy.

“Prosecutors have never gone easy on guys who killed pregnant women,” he said, “and neither have judges.”

Abortion charges are rare in New York. Last year, only one person was charged with the crime, according to the governor’s office. Prosecutors rarely used the charge because it did not add anything to the prosecution of a case, officials said.

In the case from last year, the police said Oscar Alvarez stabbed his 26-week-pregnant fiancée six times in the abdomen with a kitchen knife on May 22, 2017, after accusing her of infidelity. He then held her hostage for at least 30 minutes.