The legal battle to defend Texas' 2013 abortion restrictions — which the U.S. Supreme Court struck down as unconstitutional on Monday — cost Texas taxpayers more than $1 million, according to records obtained by The Texas Tribune.

In a 5-3 vote, the high court overturned provisions of House Bill 2 that required all Texas facilities performing abortions to meet hospital-like standards and forced doctors at those clinics to have admitting privileges at a hospital less than 30 miles away.

Legal costs associated with that case, formally known as Whole Woman's Health v. Hellerstedt, totaled $768,722. That includes salary, overhead, travel expenses and other expenses incurred by the Texas Attorney General's Office, which defended the restrictions in court.

The price tag for a previous lawsuit that targeted the admitting privileges provision — formally known as Planned Parenthood, et al v. Abbott, et al — was $311,355.

The Texas Tribune thanks its sponsors. Become one.

The state spent almost three years defending the restrictions that were ultimately overturned by the high court. In a majority opinion authored by Justice Stephen Breyer, the court indicated the two requirements provided "few, if any, health benefits for women," posed a "substantial obstacle to women seeking abortions" and placed an undue burden on the constitutional right to obtain an abortion.

Though the Supreme Court on Monday handed Texas abortion providers a major victory, House Bill 2 leaves behind a trail of shuttered clinics.

Only 19 abortion clinics — of the more than 40 that were open before HB 2 passed — remain open. Had the court upheld the hospital-like standard requirement, Texas would have been left with as few as 10 abortion clinics, all in major metropolitan areas, to serve 5.4 million women of reproductive age.

For more on this story, see how the Supreme Court ruled on Texas’ abortion clinic restrictions, what's next for Texas abortion clinics and what the ruling means for Texas women

Never miss a moment in Texas politics with our daily newsletter.