AUGUSTA, Maine — The Maine House and Senate voted Wednesday to override Republican Gov. Paul LePage’s veto of the two-year, $6.3 billion state budget, avoiding a state government shutdown and temporarily raising sales, meals and lodging taxes.

LePage said he wasn’t surprised by the votes, adding that the override represented a “sad day” for the state.

“I don’t know how you recover from a tax increase when you’re one of the worst states to do business in,” he told reporters. “I’ve done a lot of turn-arounds, but this is an obstacle. That’s like having a massive hole in the bottom of your ship when you’re trying to get across the river.”

The House voted 114-34 shortly after noon Wednesday, and the Senate followed with a 26-9 vote. Both tallies exceeded the two-thirds threshold needed to override the veto.

Wednesday’s votes marked the first time the Democrat-controlled Legislature has overridden one of LePage’s more than 40 vetoes this session. During debate, lawmakers in both chambers cast the override vote in stark terms.

“Today, you can no longer vote whether or not you agree with the budget or whether you like the budget,” said Sen. Dawn Hill, D-York, who chairs the Legislature’s Appropriations Committee that crafted the budget deal. “Today, your vote will be either to shut down or not to shut down, and I hope you will think seriously about that.”

LePage criticized members of both parties for passing a budget that raises taxes and not discussing his budget proposal or the prospect of passing a temporary budget to prevent a shutdown with him.

“Democrats didn’t talk to me much. Neither did Republicans,” LePage said. “The Republican Party is not a very strong party.”

Wednesday’s vote in the Senate came down to whether at least four of the five Republicans who originally voted for the budget would stand by their votes to override LePage’s veto — something the Senate hasn’t done throughout the legislative session. All five voted to override the veto, as did Republican Sen. Ed Youngblood of Brewer, who voted against the budget on June 13.

Youngblood called his override vote “a very, very difficult decision.”

“I’m conservative,” he said. “Two hundred million dollars of new taxes were just too much for me to swallow, but we need to put this budget behind us.”

Republican senators who supported the override said they wanted to back the work of the lawmakers on the Appropriations Committee who negotiated the budget deal over the past six months.

“This budget is ugly. We have no great options. We were briefed that we were voting for things we were diametrically opposed to,” said Sen. Brian Langley, R-Ellsworth. “My vote today is a statement of support for our Republican team on the Appropriations Committee. For what it’s worth, I’ve got your back.”

Sen. Tom Saviello, R-Wilton, touted Republican victories in the budget. Income tax cuts lawmakers passed two years ago that have been championed by LePage and Republicans remain intact, he said, as well as a Republican-backed proposal forming a work group to review unfunded mandates on towns and cities.

“Today, I vote with my friend, and fellow logger, Troy Jackson,” Saviello said, referring to LePage’s comments last week about the Democratic senator from Aroostook County.

Some House members spoke in similar terms, while many of the budget opponents said concern for constituents caused them to stick with their original votes against the deal.

“This budget represents poor choices and misplaced priorities,” said Rep. Lawrence Lockman, R-Amherst. “It represents politics as usual in Augusta, a surrender to the status quo and a dangerous disregard for the challenges facing our state. … Mainers cannot afford to pay any more taxes.”

Rep. Jarrod Crockett, R-Bethel, who voted against the budget earlier this month but flipped his vote on Wednesday, said a state government shutdown would have been a failure for lawmakers.

“I’m either voting for a budget that I don’t necessarily love or I can vote for a government shutdown,” he said. “That’s what the people back home see this as.”

“Voting [no] is absolutely nothing less than chaos,” said Rep. Kathleen Chase, R-Wells, the ranking Republican on the Appropriations Committee.

“There isn’t a member in this chamber who couldn’t find fault with some aspect of this budget,” said Rep. Peggy Rotundo, D-Lewiston, House chairwoman of the Appropriations Committee. “Yet this is a true compromise. … In a divided government we cannot demand all or nothing.”

Tension began building over the biennial budget as soon as LePage proposed it in January, with much of the discussion focused on LePage’s proposals to zero out funding for the municipal revenue sharing program for two years and cut back property tax relief programs.

The 13-member Appropriations Committee wrote a unanimously supported package that avoids nearly 65 percent of the revenue sharing cuts and restores some property tax relief — in part by raising the sales tax from 5 percent to 5.5 percent, and meals and lodging taxes from 7 percent to 8 percent until July 1, 2015. The lawmakers also introduced a $30 million boost in spending on public schools and funds to restore merit and longevity pay for state workers who have had their salaries frozen for more than four years.

LePage on Wednesday called his original budget package “a good budget.”

“We spent six months creating a budget,” he said. “They sat on it for five-and-a-half months, and they never asked us about it.”

LePage said he was particularly upset no Republicans spoke up for him in May when he tried to address the Appropriations Committee and Hill, the Senate chairwoman, didn’t let him.

“That told me the Legislature is clearly a different branch of government, and it’s more of a country club to get along than to get along with the executive branch,” he said.

LePage singled out for criticism House Republican Leader Kenneth Fredette of Newport — who voted for the budget and the override, after labeling LePage’s call for a temporary budget “unreasonable.”

“If there were a viable alternative, a path to inject more Republicans values into this budget, I would consider it,” Fredette during a House floor speech Wednesday. “The choice we have is a shutdown or a budget compromise. The time for negotiation has passed. There is no plan B, nor have I been approached with a plan B.”

Members of Democratic leadership defended Fredette on Wednesday afternoon as a legislator who is willing to negotiate and at times, compromise. They said LePage singling out Fredette was inappropriate.

“It’s sad on a day when he could just be quiet and understand that his party and Democrats came together to pass a budget overwhelmingly,” said Senate President Justin Alfond. “He could just say ‘I’ve lost this’ and move on.”

House Speaker Mark Eves called Fredette’s comments Wednesday “honest.”

“Today is a really hard day for the governor,” said Eves. “He’s started to realize that he’s become irrelevant. You’re starting to see a separation in his party for good reason politically.”

The biennial budget, because it was passed so late in the legislative session and is considered an emergency measure, required a two-thirds vote in the House and Senate to take effect by the July 1 start of the new fiscal year. The enactment votes barely met that threshold, 102-43 in the House and 25-10 in the Senate.

Wednesday’s House vote wasn’t as close, with some Democrats, Republicans and independents who originally opposed the budget voting to override the veto.

In addition to Crockett, other House members who voted for the override after originally voting against the budget included Democrats Andrea Boland of Sanford, Alan Casavant of Biddeford, Bryan Kaenrath of South Portland, Katherine Cassidy of Lubec, Ralph Chapman of Brooksville, Lisa Villa of Harrison and Denise Harlow of Portland; independents Jeffrey Evangelos of Friendship and Ben Chipman of Portland; and Republicans Allen Michael Nadeau of Fort Kent and Jethro Pease of Morrill.

The votes to override the budget veto put legislators in a position Wednesday to divvy up about $1.25 million for roughly 130 bills that passed without dedicated funding. The bills that gain funding will go to LePage, who could veto them, sign them or let them take effect without his signature.