Private health care providers cannot sue to force states to raise their Medicaid reimbursement rates to keep up with rising medical costs, the Supreme Court ruled Tuesday.

In a 5-4 decision the broke across ideological lines, the justices said medical companies have no private right to enforce federal Medicaid funding laws against states if Congress has not created such a right.

The ruling is a blow to many doctors and health care companies that complain Medicaid reimbursement rates are so low, they often lose money seeing patients participating in the program. They consider lawsuits such as the 2009 case against Idaho their only option to make states comply with federal law and offer adequate coverage.

The lawsuit claimed Idaho was unfairly keeping Medicaid reimbursement rates at 2006 levels despite studies showing that the cost of providing care had gone up. Lower courts agreed and the increased reimbursements cost Idaho an additional $12 million in 2013.

But the Supreme Court sided with state officials, saying it's up to the federal agencies that oversee Medicaid to decide whether a state is in compliance with reimbursement rules.

Writing for the court in Monday's decision, Justice Antonin Scalia said the Constitution's Supremacy Clause makes federal law supreme over state law, but "it was not understood as conferring a private right of action." Scalia also said the medical providers have no right to seek relief under Idaho law.

Joining Scalia for most of his opinion were Chief Justice John Roberts and Justices Clarence Thomas, Stephen Breyer and Samuel Alito.

In dissent, Justice Sonia Sotomayor said there has been a long history of federal courts allowing private parties to stop unconstitutional government action. She said nothing in the Medicaid Act indicates that Congress meant to prevent enforcement in private lawsuits.

Sotomayor's dissent was joined by Justices Anthony Kennedy, Ruth Bader Ginsburg and Elena Kagan.

Medicaid, the federal health insurance program for the poor that is administered by the states, covers more than 60 million people nationwide.

The medical companies argued that going to court was the only way to push Idaho to comply with Medicaid laws since federal officials had taken no action.

Idaho officials said the suit interfered with its ability to fund Medicaid programs within budgetary limits. They also say the action frustrates Congress' goal of allowing states flexibility in administering Medicaid programs.  Twenty-seven states filed legal papers supporting Idaho.

The case involved five centers that provided care to developmentally disabled children and adults. They argued that Idaho was improperly keeping reimbursement rates at 2006 levels and ignoring rising costs.

Federal Medicaid law says states must set procedures for determining reimbursement rates. Those rates must be consistent with efficiency, economy and quality of care to encourage providers to offer services.