CONCORD — A bill to change the terms of work and community service requirement in the state’s expanded Medicaid program has passed the state Senate and is on its way to the House.

Thursday’s party-line, 14-10 vote comes the day after a federal judge blocked new work requirements on Medicaid recipients for a second time.

U.S. District Court Judge James Boasberg on Wednesday rejected Medicaid work requirements in Arkansas and Kentucky, ruling they hurt Medicaid’s basic purpose of providing health coverage to low-income households.

A similar legal challenge to New Hampshire’s work requirement has been filed in the same court by the National Health Law Program, New Hampshire Legal Assistance and the National Center for Law and Economic Justice on behalf low-income residents in the state.

The fact that New Hampshire’s work requirement could be struck down on the same basis hung over Thursday’s debate. Democrats described their bill as a contingency plan should the work requirement cause thousands of people to lose coverage, as was the case in Arkansas.

Republicans said they were willing to address that problem if and when it occurs, but for now there is no problem. They accused Democrats of a double-cross on the issue — agreeing to the work requirement to get expanded Medicaid passed, and then trying to negate that requirement once they obtained a legislative majority.

“If the kind of problem that happened in Arkansas happens in New Hampshire, I’ll be among the first people to join with all 24 of us to fix whatever issue it is that is leading to inadvertent denial of benefits. None of us wants that,” said Republican Sen. Jeb Bradley of Wolfeboro, one of the key negotiators of the expanded Medicaid compromise.

“What I don’t want to do is enable people who are unwilling to work to avoid the work and community engagement requirement.”

Senate Bill 290 would, among other things, terminate the work requirement if it results in more than 500 people losing their government-funded health insurance.

The Democratic-led House recently shelved its own bill to completely eliminate the work requirement to allow the debate to focus on the Senate bill.

If the Senate bill passes the House, it is likely to face a veto from Republican Gov. Chris Sununu, who on Thursday issued a joint statement with Republican legislative leaders.

“A ruling from one federal trial court judge in Washington, D.C., is only the first step in the process, and we are confident that the work requirements approved for New Hampshire and every other state will ultimately be upheld,” he said.

“New Hampshire will move forward with implementation of our work requirement, and we will do everything we can to defend New Hampshire’s bi-partisan Medicaid program, including intervening in the lawsuit to assert our state’s interests.”

The primary sponsor of the bill, Sen. Cindy Rosenwald, D-Nashua, said the lawsuits point to the need for New Hampshire to have an alternative in place.

“We have recently seen what happens when work requirements go wrong,” she said. “Given these realities, it is disappointing that my Republican colleagues voted against these improvements today.”