California’s attorney general is suing Providence St. Joseph Hospital, saying it illegally denied emergency abortion care to a woman whose pregnancy was no longer viable after her water broke 15 weeks into carrying twins.

Attorney General Rob Bonta filed the lawsuit in Humboldt County Superior Court and shared details Monday of the case of Anna Nusslock. In February, Nusslock was 15 weeks into her pregnancy when her water broke and she was rushed to the Catholic hospital in Eureka, where she lives.

According to the complaint, Nusslock was told by the doctor at the hospital that they could not provide an abortion “so long as one of Anna’s twins had detectable heart tones, unless Anna’s life was sufficiently at risk.” The doctor recommended she take a helicopter to UC San Francisco for emergency services.

But she doubted her insurance would cover the $40,000 cost of the ride.

She asked if she could drive to UCSF, and the doctor advised that if she drove 270 miles south, which is about five hours, to San Francisco she would “hemorrhage and die,” according to the complaint. Nussbaum was discharged to Mad River Community Hospital 12 miles away, where she received the abortion at a labor and delivery unit that is scheduled to close this month, according to Bonta’s office.

“They broke the law, and we are taking action to make sure they never do it again,” Bonta said at a news conference.

A spokesperson for Providence Health and Services, the hospital’s parent company, said in a statement Monday that it was reviewing the complaint, which it had just learned of.

The hospital said Tuesday it had reached out to Nusslock to apologize and it was revisiting training and education in emergency medical situations.

“This was a tragic situation that did not meet our high standards for safe, quality, compassionate care,” said Garry Olney, chief executive for the Providence Northern California Service Area, in a message to employees. “We will learn from this and renew our commitment to ensuring that the care and experience we deliver are aligned with our high standards, every time and in every care setting.”

Bonta’s lawsuit states that California’s Emergency Services Law prohibits “patient dumping” and requires emergency departments to provide emergency care to those who need it. The lawsuit alleges violations of state civil rights and unfair competition laws.