The Supreme Court ruled unanimously today that patients cannot sue managed-care companies in state courts for refusing to pay for medical care recommended by doctors.

The ruling overturned a U.S. appeals court decision in favor of allowing lawsuits to proceed in Texas against two large health insurance companies. In those cases, two Texas residents had filed separate lawsuits under a 1997 state law, the Texas Health Care Liability Act, aimed at protecting patients enrolled in managed-care plans.

In an opinion written by Justice Clarence Thomas, the justices said such lawsuits were barred by a 1974 federal law. That law, the Employee Retirement Income Security Act, encouraged the formation of employee benefit plans by making them subject only to federal regulation, rather than a patchwork of state rules.

Under the federal law, Thomas wrote, the managed-care patients in the case can sue only in federal courts.

Insurers have argued that even if federal courts take such cases, patients can sue only to recover the value of the benefit that was denied, rather than the large malpractice damages that state courts have sometimes awarded.

The Supreme Court had ruled in 1987 that the federal law precluded state suits against employee benefit plans, but state officials argued that conditions have changed since then. According to the state officials, health insurance companies are now making medical decisions in their efforts to reduce costs, sometimes overruling doctors and damaging patients' health in the process.

Besides Texas, nine other states have laws that allow patients to sue their health maintenance organizations in state courts. They are Arizona, California, Georgia, Maine, New Jersey, North Carolina, Oklahoma, Washington and West Virginia.

The state laws have arisen in the absence of federal legislation on HMO patients' rights, an issue that Congress has not been able to resolve in recent years.

Today's decision represented a victory for HMOs and the Justice Department. HMOs, backed by business groups, had argued that allowing the lawsuits in state courts would drive up health care costs. The Justice Department had sided with the HMOs, contending that state lawsuits would undermine the 1974 federal law, which was aimed at getting employers to set up health insurance plans for their workers.

President Bush had made the state law, which he signed as Texas governor, a centerpiece of his healthcare plan in the 2000 presidential election campaign.

The case originated with lawsuits by two HMO patients who said their health was damaged by their insurers' refusal to pay for treatment recommended by their doctors.

In one case, Juan Davila, a member of a health plan insured by Aetna Health Inc., said the company denied his doctor's prescription for Vioxx for arthritis pain and would pay for only a cheaper alternative, Naprosyn. David said that, several weeks later, he developed a severe bleeding ulcer, which he attributed to the side effects of Naprosyn.

In the second case, Ruby Calad, who was covered by Cigna HealthCare of Texas, wanted to spend several days in a hospital following a hysterectomy, a stay recommended by her doctor. But Cigna would pay for only one day, and Calad said she developed serious complications, forcing her to return to the hospital.

The initial efforts by Davila and Calad to sue in state courts were blocked when the health insurance companies succeeded in getting the cases moved to federal court. But the U.S. Court of Appeals for the 5th Circuit, based in New Orleans, subsequently ruled in favor of the patients, and the companies appealed to the Supreme Court.

The cases were Aetna Health v. Davila, No. 02-1845, and Cigna Corporation v. Calad, No. 03-83.

Washington Post staff writer Charles Lane contributed to this report.