[What you need to know to start the day: Get New York Today in your inbox.]

The victims came to New York hospitals after being sexually assaulted. Then, against state law, they were billed for their own rape evidence kits. In some cases, they were hounded by bill collectors.

A yearlong investigation by the state attorney general, Barbara Underwood, found that seven hospitals in New York had illegally billed more than 200 sexual assault survivors for rape kits, with individual charges ranging from $46 to $2,892. Ms. Underwood said on Thursday that her office had reached civil settlements with the hospitals, who agreed to refund patients and to implement formal policies to ensure that it would not happen again.

“Survivors of sexual assault have already gone through unfathomable trauma,” Ms. Underwood said in a statement. “To then subject them to illegal bills and collection calls is unconscionable.”

The investigation started last November when advocates for sexual assault victims told the attorney general’s office about a woman who had been billed seven times for her rape kit, first by Brooklyn Hospital Center then by debt collectors. That case led to a wider inquiry.