New Hampshire Gov. Maggie Hassan poses for a photograph at the start of the morning session of the National Governors Association winter meeting in Washington, D.C., Saturday, Feb. 22, 2014. (AP Photo/Cliff Owen)

After months of negotiations, the New Hampshire Senate on Thursday voted to expand Medicaid to cover as many as 50,000 low-income residents using tens of millions of dollars in federal aid.

About 12,000 residents who would qualify for coverage would be given subsidies to pay for insurance through their employers. Thousands more would receive subsidies to buy private insurance through the state’s health-care exchange.

The state will now seek a waiver from the Department of Health and Human Services to implement the modified program. HHS has granted preliminary permission to several other states that wanted to implement similar programs, rather than simply expanding Medicaid to cover those who made less than 138 percent of the federal poverty level, under the Affordable Care Act.

Senate Republicans had sought political cover to accept federal money under the ACA. In recent weeks, several local Republican Party organizations have voted on resolutions opposing Medicaid expansion, despite the fact that Senate President Chuck Morse (R) was one of the leading proponents of the compromise.

The debate is far from over: The proposed legislation expanding Medicaid sunsets at the end of 2016, when the amount of federal money covering the state’s costs decreases from 100 percent to 90 percent. Morse told the Concord Monitor he was unwilling to allow New Hampshire to cover the remaining 10 percent, because he said he didn’t think the state could afford the costs.

In a recent interview, Gov. Maggie Hassan (D) said the political cover the compromise affords to Republicans was key to getting a deal done.

“What was important to conservatives was that we not permanently expand Medicaid,” Hassan said. “Our goal was to get people covered as quickly as possible.”

In the end, seven Republicans voted with 11 Democrats to pass the compromise by an 18-5 margin. The measure will be sent back to the state House of Representatives, which is controlled by Democrats; the House passed a straight expansion of Medicaid last year and is likely to rubber stamp the Senate compromise.

Once Hassan signs the bill, New Hampshire will be at least the 28th state to expand Medicaid under the Affordable Care Act, and the fifth — along with Iowa, Arkansas, Pennsylvania and Michigan — to move forward with a customized version of its own. Debate is still ongoing in Montana, Indiana and Tennessee, while other states are still actively seeking waivers from HHS.