AUGUSTA, Maine — The Maine Senate on Thursday approved a supplemental budget for the Department of Health and Human Services, closing the book on more than two months of emotional public hearings, exhaustive work sessions and tense behind-the-scenes negotiating.

The Senate vote was 27-8, well above the two-thirds majority needed to have the budget go into effect immediately. All Republicans voted for the budget, along with seven Democrats and Sen. Richard Woodbury of Yarmouth, who is unenrolled.

Gov. Paul LePage also announced later in the day that he had signed the bill.

The Maine House voted 109-27 last week — also well above a two-thirds majority — on an amended version of a budget bill that had been crafted and approved unanimously by the Legislature’s Appropriations Committee.

However, when that amended bill went before the Senate last Thursday, Democrats blocked passage, prompting outrage and accusations of obstructionism from their GOP counterparts.

This Thursday, the Senate passed the same amended bill, but only after Democrats were assured that their last-minute request to help transition veterans who would be dropped from MaineCare would be addressed later in the session.

“Today’s vote is enormously important to MaineCare recipients, as well as every hospital, nursing home and assisted living facility and other health care provider in Maine, and the jobs and quality care they provide,” Senate President Kevin Raye of Perry said.

Senate Minority Leader Barry Hobbins, D-Saco, said he was glad to have the vote behind him.

“During the past week of negotiations we were not looking to move mountains here. Simply, Democrats wanted to create a softer landing for the people of Maine transitioning off of MaineCare,” he said. “The vote here today reflects the tug-of-war between needing to keep the lights on and the bills paid and taking care of our most vulnerable neighbors.”

The compromise budget bill, LD 1816, cuts approximately $120 million from the current fiscal year DHHS budget through a combination of changes to MaineCare eligibility and shifting funds from various accounts. It also includes an additional $25 million in savings across state government that were identified by a budget streamlining committee last fall.

The final budget differs significantly from an initial proposal offered by Gov. LePage late last fall that sought to trim $220 million from the DHHS budget for 2012 and 2013.

The compromise budget dropped the governor’s proposed cuts to the drugs for the elderly program, the Fund for Healthy Maine, to private non-medical institutions and to hospitals for rate reimbursements.

It also retained MaineCare for an estimated 18,000 childless adults, known as noncategoricals, by capping funding for the program at $40 million and freezing enrollment. The budget does lower the eligibility threshold for parents of children on MaineCare from 200 percent of the federal poverty level to 133 percent but that change will not go into effect until Oct. 1, 2012.

“This budget will keep the lights on, ensure that health care workers get paid, and continue critical health care services for thousands of Maine people,” House Minority Leader Emily Cain of Orono said. “The Republican pursuit of eliminating people’s health care has been a distraction from the laser focus that is needed to reinvigorate jobs and the economy in our state.”

The budget nearly stalled in the House last week until an amendment from Rep. Patrick Flood, R-Winthrop, the co-chair of the Appropriations Committee, helped move enough House Republicans to vote in favor.

The amendment first removed a provision from the budget that dealt with a tax on insurance claims with Dirigo Health, a sticking point for conservative House members.

Originally, the tax rate was set to drop from 1.87 to 1.64 percent but the budget proposed keeping the tax at 1.87 percent, allowing the state to retain about $5 million in revenue. The amendment ensures that the rate reduction goes into effect.

In exchange for that piece, House Democrats wanted to restore an estimated $14 million in funding to hospitals for the rest of fiscal year 2012 and 2013.

The final element in the House amendment established a sunset date for childless adults, or noncategoricals, to be removed entirely from MaineCare rolls.

LePage has expressed frustration over the budget process and has been particularly critical of Democrats. On Thursday, he said he was pleased to see the budget pass.

“The fiscal integrity of our State is frail, but the passage of this bill today is a step in the right direction,” the governor said in a statement. “As chief executive, these decisions are not easy, but they are necessary in order to avoid a financial crisis within our welfare system. Unlike the federal government, Maine must be able to pay its bills and achieve a balanced budget.”

Not everybody was happy, and those bruised feelings could be a sign of things to come as the session rolls on.

“Making this a better budget does not make it good,” said Assistant Senate Minority Leader Justin Alfond of Portland, who voted against the bill. “Democrats feel strongly that this budget does not reflect Maine values. It’s time to put this behind us and refocus our efforts on the issues that matter most to Maine people, like how to get people back to work and a few more dollars in their pockets.”

The legislative victory on the budget will be short-lived, since it only affects the budget year that ends June 30. Lawmakers still need to deal with an estimated $85 million to $90 million shortfall in the 2013 budget.

“Clearly, there is difficult work ahead,” House Speaker Robert Nutting, R-Oakland, said. “But what was accomplished today will help put DHHS on a path to sustainability in the long run.”

The next budget bill could be where the Senate Democrats’ request for veterans’ care gets discussed. Gov. LePage and Republican leaders have pledged to support that proposal, which involves shifting veterans who are noncategoricals from MaineCare to veterans’ affairs benefits.