PHOENIX — The state's high court this morning upheld the legality of an assessment on hospitals that helps pay for health care for 400,000 Arizonans.

In a unanimous decision, the justices rejected arguments by the attorney for some Republican lawmakers that the levy, approved by the Legislature in 2013, was illegally enacted.

They argued that it really was a tax, making it subject to constitutional requirements for a two-thirds vote in both the House and Senate. The measure passed with a simple majority.

But Chief Justice Scott Bales, writing for the court, said there is an exception to that requirement for assessments that are approved not by lawmakers but instead by a state agency. And that, he said, is the case with the $290 million being raised here.

The justices also rejected arguments that the the two-thirds vote requirement should apply because the Legislature authorized the director of the state's Medicaid program to impose the assessment in the first place.

At the heart of the fight has been then 2013 decision by then-Gov. Jan Brewer to take advantage of a provision of the Affordable Care Act to expand Medicaid coverage.

It provided for the federal government to pick up most of the costs for expanding healthcare coverage to those earning up to 138 percent of the federal poverty level, currently about $28,180 for a family of three. Before expansion, the program covered only those below the poverty line, or $20,420 at current levels for the same size family.

But to get those funds, the state first had to restore coverage for childless adults. Enrollment for them had been frozen years earlier in a budget-savings maneuver.

To cover that cost and other state expenses, Brewer proposed giving Tom Betlach, director of the Arizona Health Care Cost Containment System, the state's Medicaid program, authority to impose a charge on hospitals.

The plan was adopted by a simple majority of the House and Senate, with the Republican governor cobbling together a coalition of Democrats and some members of her own party to vote for it.

Hospitals did not object because Betlach crafted the levy so that every hospital chain actually would make money from the deal: More patients with government-provided insurance coverage means fewer bills written off as bad debt because of a person's inability to pay.

But the lawmakers who voted against expansion sued, contending the levy was illegally enacted. Christina Sandefur, attorney for the Goldwater Institute, who represented them, argued that a 1992 voter-approved state constitutional amendment requires a two-thirds vote for such increases, even if the hospitals themselves -- the people paying it -- did not object.

Lower courts disagreed, saying the levy fits within an exception to that supermajority requirement because it was imposed not by the Legislature but by a state agency. That sent the case to the Supreme Court.