“What was it that made these three defendants circumvent all the rules they were aware of?” the lead prosecutor, Rachana Pathak, said in her closing remarks in November. “Money, money, money.”

At Friday’s sentencing, Ms. Hrynenko’s lawyer countered that characterization. He described his client as a survivor of domestic abuse who was a loving woman.

“She cares about others,” the lawyer, Michael K. Burke, said. “She cares about people.”

Mr. Kukic’s lawyer, Marc Agnifilo, said his client, a refugee who had fled war-torn Montenegro decades ago, was a dedicated worker striving to help bring his family members to the United States.

Mr. Kukic told the court that he would trade his life for those of the victims “in a second.”

From the start, the Manhattan district attorney, Cyrus R. Vance Jr., described the case as a death-dealing plot of deceit, chicanery and subterfuge.

After the death of her husband in 2004, Ms. Hrynenko assumed control of his housing stock. She hired Mr. Kukic to renovate apartments at 121 Second Avenue in 2013.

The work was completed the next year, but the utility company Consolidated Edison did not approve gas lines for the apartments. Still, Ms. Hrynenko immediately began shuffling tenants into the building, subletting apartments at an average price of $6,000 each per month.

Hyeonil Kim, the owner of Sushi Park, a popular Japanese restaurant on the building’s ground level, said he had wondered how the apartments got hot water and cooking gas since the only gas line into the building was dedicated to his restaurant.