The state has spent about $2 million on the girl's care. (AP photo/J. Scott Applewhite).

WASHINGTON (AP) — The Supreme Court has blocked North Carolina from trying to take more than $900,000 from a legal settlement won by the family of a 13-year-old girl who suffered devastating injuries during her birth.

The court ruled 6-3 Wednesday, in Wos vs. EMA (12-98), in favor of the family of the girl, who was identified only as E.M.A.

The girl is severely disabled as a result of what her parents say was a botched delivery.

North Carolina has spent nearly $2 million for her medical care and when the family settled a malpractice lawsuit for $2.8 million, the state claimed a third of the settlement.

Writing for the court, Justice Anthony Kennedy said the state can’t automatically claim one-third share of the settlement as reimbursement for medical care without determining how much of the settlement is attributable to the care.

The federal Medicaid anti-lien provision is incompatible with North Carolina’s “irrebuttable, one-size-fits-all statutory presumption,” the majority ruled. 

Allison Bell contributed to this report.