One of Gov. Tom Corbett's first actions in office was to dismantle the adultBasic program that had provided low-cost health insurance to 41,000 low-income workers. Doing so was not only bad policy, as it turns out, but contrary to state law.

Commonwealth Court Judge Dan Pellegrini ruled Tuesday that two laws that ended funding for adultBasic and Medicaid coverage for disabled workers were unconstitutional. Funding for those or equivalent programs, the judge ruled, must be restored in the state's next budget.

Money specifically was directed to adultBasic by a state law governing the distribution of the state's proceeds from the 1998 national settlement with the tobacco industry. The Legislature directed 30 percent of that money to adultBasic and the Medicaid program for disabled workers.

The Rendell administration gradually shifted more money to the disabled program and replaced the adultBasic share with contributions from the massive surpluses held by the state's four Blue Cross nonprofit health insurance companies.

Those insurers decided not to renew their contributions just as Mr. Corbett came into office, and he decided to terminate adultBasic. The administration had argued in court that most of the required 30 percent of the tobacco settlement had been directed to the Medicaid program for disabled workers.

It's not yet clear how the issue will play out, since the increased funding to the Medicaid program for the disabled might satisfy the court. And the judge offered another out, saying that intervening legislation could redirect the money.

But the governor should grasp another option. Most of the low-income workers who lost their insurance when adultBasic ended would be covered next year if the governor agrees to expand Medicaid coverage. The federal Affordable Patient Care Act, also known as Obamacare, would expand Medicaid eligibility as a principal means of reducing the number of uninsured Americans - in states that agree to do so.

Unlike many of his fellow Republican governors, Mr. Corbett has not agreed to expand coverage even though it would be a good deal for the state. The federal government would pay 100 percent of the cost for the first three years, and the state would pay just 10 percent thereafter.

Increasing coverage through Medicaid would re-establish the lost adultBasic coverage at low cost while resolving the legal issue. Mr. Corbett should seize the opportunity.