AUGUSTA, Maine — The most costly struggle in history for control of the Maine Legislature shifted from totaling campaign expenditures to counting votes Tuesday.

In 2010, Republicans gained majorities in both the Maine House of Representatives and the Maine Senate for the first time since 1974. In the House, Republicans hold 77 seats, Democrats hold 70 seats, unenrolled legislators occupy two seats and two vacancies exist. The Senate is made up of 19 Republicans, 15 Democrats and one unenrolled member.

Reeling after that repudiation and Democratic gubernatorial candidate Libby Mitchell’s third-place finish in the 2010 contest that sent Republican Paul LePage to the Blaine House, the Maine Democratic Party dedicated itself to regaining majorities in this year’s legislative elections.

With the Maine Republican Party equally determined to retain legislative majorities and a decrease in the number of candidates participating in the Clean Election Act public campaign financing program, outside spending on the 186 legislative races more than doubled from the record high of $1.5 million spent in 2010. As of Monday, overall outside spending on Maine legislative races topped $3.5 million.

One race, between incumbent Republican Sen. Nichi Farnham and Democrat Geoffrey Gratwick in District 32, representing Bangor and Hermon, attracted outside spending of more than $12 per resident of the district.

Democrats attributed Republican victories in five key 2010 Senate elections to a late infusion of nearly $400,000 from the Republican State Leadership Committee. Farnham was one of five Republican senators who won races targeted by the committee two years ago.

Another of the five GOP senators elected in a race that drew Republican State Leadership Committee funding in 2010 was Thomas Martin of Senate District 25 in the Waterville area. Martin’s re-election bid this year garnered global attention after the Maine Republican Party created a website to draw attention to Democratic challenger Colleen Lachowicz’s status as an online World of Warcraft fantasy game player.

The electoral fate of Farnham, Martin and two other first-term GOP incumbents who won two years ago with Republican State Leadership Committee backing — Sen. Lois Snowe-Mello in District 15 and Sen. Garrett Mason in District 17 — will figure prominently in deciding who controls the next Maine Senate.

Another Senate contest to watch is in District 11, where independent Sen. Richard Woodbury of Yarmouth encounters a stiff challenge from Republican Christopher Tyll. No Democrat appears on the ballot. Funding his campaign privately, Tyll amassed significantly more money than Woodbury, a Clean Election candidate, who this year did not receive matching funds after a U.S. Supreme Court ruling that nullified the matching funds component of the Maine Clean Elections Act.

In the House, Democrats will look to win back seats in York County, where Republicans made gains in 2010. Another race to watch is House District 128, where Rep. Heather Sirocki, R-Scarborough, attempts to fend off Democrat Jean-Marie Caterina. Environmental advocacy groups earlier this fall singled out Sirocki as the first Maine lawmaker placed on the League of Conservation Voters’ “Dirty Dozen” list.

Republicans will look to solidify gains the party’s House candidates have made during recent elections in northern and western Maine.

The prospect of dictating the terms for legislative redistricting, which occurs every 10 years based on new U.S. Census data, elevates the stakes in this year’s joust for majority status. The party that holds a majority of legislative seats also will wield power in the election of the state treasurer, secretary of state and attorney general. The party in power typically names committee chairmen, who run meetings and set agendas. The party that controls the House would have more voting members on committees.

Members of 126th Legislature will determine whether LePage’s calls for cutting taxes, tightening eligibility for social welfare programs and reforming the state’s regulatory system to promote business growth will move ahead. The next Legislature also must pass a budget for the two-year cycle that begins July 1, 2013.

Members of the Maine Democratic Party will monitor results from the Bayside Bowl in Portland. The Maine Republican Party will gather in Augusta to await returns, according to spokesman David Sorensen.