In a case that could involve hundreds of millions of dollars, the Florida Supreme Court upheld a state law that directed Sarasota County to reimburse private hospitals for providing care to indigent patients.

The justices, in a 5-2 decision, overturned an appeals-court ruling that said part of the 2003 law was unconstitutional because it singled out private hospitals in Sarasota County. The 2003 measure was passed as what is known as a “special law,” dealing only with Sarasota County, rather than a general law that would apply to hospitals throughout the state.