Republicans and Democrats were locked in a battle for Maine’s Legislature late Tuesday, with control of the Senate and the power to influence the next governor’s policy agenda at stake.

It was unclear early Wednesday which party would hold the majority of seats in the Senate, where Democrats entered Tuesday’s elections with just a 19-15 edge, plus one independent who was not seeking re-election. Republicans defeated or were leading incumbent Democrats in several closely watched Senate races and were widely expected to pick up seats in the House. But it would take a substantial swing for Republicans to overcome the more than 30-seat advantage that Democrats held in the House entering Election Day.

Both parties were hoping the larger-than-anticipated turnout would benefit them, although neither party was willing to claim victory as midnight approached.

“We think the increased turnout, beating projections, helps up and down the ticket,” said Ben Grant, chairman of the Maine Democratic Party. “We had a slate of great candidates who ran great races. But I do think it will remain tight throughout the night.”

“It’s early right now so we don’t really know, but I think it’s fair to say the Republicans will pick up seats in the Maine House of Representatives and in the Maine Senate,” said Maine Republican Party Chairman Rick Bennett, a former state lawmaker. “How many is an open question,” Bennett said, adding that he would put the odds of winning the Senate at 50-50.

Just before midnight, Democrats had won or were clearly leading in 11 of the 35 Senate races, while Republicans had captured or had a definitive advantage in 10 races. In Auburn, a Republican challenger defeated a Democratic incumbent. But in one closely watched race in Bangor, a Democratic incumbent held off an aggressive challenge from a Republican.

The Democratic and Republican parties, along with a host of special interest groups, spent more than $2.3 million on legislative races this year, with much of that money flowing into several dozen close races. Expenditures by Democrats and their allies far exceeded those of Republican groups.

National third-party groups also played a large financial role in Maine’s legislative races, reflecting a trend in which the two national parties and their supporters are trying to influence policy decisions in state capitals as well as in Washington, D.C.

Those expenditures are also attributable to the U.S. Supreme Court ruling in the Citizens United case, as well as other court rulings, that loosened restrictions on campaign spending by outside groups.

Most attention was focused on the Senate on Tuesday as Republicans tried to take back the majority after two years of Democratic control. Outside groups spent heavily in select races considered toss-ups, some of which drew more than $200,000 in outside money.

One of the tightest Senate races appeared to be in District 21 in Lewiston, which Democrat Nathan Libby won with just 64 votes over Republican Patricia Gagne out of more than 13,000 votes cast, according to unofficial results compiled by the Portland Press Herald.

In the contentious race for District 20 in Auburn, Republican Eric Brakey won decisively over Democratic incumbent John Cleveland with 58.7 percent of the vote.

In the closely watched District 9 race encompassing Bangor and part of Penobscot County, incumbent Democrat Geoff Gratwick beat Republican Cary Weston with 53 percent of the vote. In a race between two former Bangor City Council members, Democratic expenditures to oppose Weston vastly outweighed Republican expenditures against Gratwick – in this case by a margin of more than 100 to 1, or $172,000 to $1,600.

One of the most expensive legislative races in the state was in Cumberland County, where District 30 challenger Republican Amy Volk of Scarborough had a commanding lead over incumbent Democrat James Boyle of Gorham, 54 percent to his 46 percent, with 67 percent of votes tallied. Groups dumped roughly $249,000 into the race – including $129,000 by the Maine Democratic State Committee alone.

Both of Portland’s senators – Senate President Justin Alfond and Sen. Anne Haskell, both Democrats – defeated their opponents by large margins, according to the unofficial results.

The balance of power in the Legislature directly impacts the occupant of the Blaine House, as Gov. Paul LePage has personally experienced over the past four years.

LePage entered office in January 2011 alongside the first Republican majorities in both the House and Senate since the mid-1970s. Although not successful on all of his policy priorities, LePage was able to push through the largest tax cuts in state history, pass a controversial health insurance bill and end same-day voter registration with the backing of his Republican majorities. (Maine voters subsequently restored Election Day registration through a referendum.)

But Democrats, riding a wave that re-elected President Obama, won back control of both chambers in 2012. Since then, LePage has battled hard – and publicly – with House and Senate Democrats on a long list of policy issues.

“There has been a ton of energy in the state Senate races, and for good reason, because over the past two years, especially, if not for the Senate, the governor’s (radical) policies would have been passed,” Alfond said in an interview not long before the polls closed. “I think people are ready to make their voices heard.”

Sen. Mike Thibodeau of Winterport, who serves as the Senate Republican leader, said “the voters are eager to send a message and we are anxious to hear what that message will be.”

But while Thibodeau said high turnout is good for everyone, he suggested people should be shocked by the more than $800,000 spent by the Maine Democratic Party and allied groups in opposition to Republican candidates. In comparison, just under $100,000 was spent by third-party groups to oppose Democratic candidates.

“We’ll see how the voters feel about it,” Thibodeau said earlier Tuesday.

Kevin Miller can be contacted at 791-6312 or at:

[email protected]