Republican State Sen. Nichi Farnham has been running — literally — throughout Bangor and Hermon to convince voters in District 32 that she deserves a second term. Geoff Gratwick, her Democratic challenger, has been campaigning on his bicycle.

Farnham describes the race as a “healthy competition” between two candidates with different views. Democratic and Republican operatives, however, have ascribed some urgency to the race, along with dozens of others that could affect the balance of power at the State House.

At stake is a Republican agenda that has been laden with change and, at times, controversy.

The largest tax cut in state history was enacted, although not entirely paid for. A contentious overhaul of the state’s health insurance laws was passed, along with a charter school bill and initiatives to ease regulation.

Now Democrats see a chance to take back the Legislature in November, where Republicans hold a 77-70 edge in the House (two members unenrolled, two seats vacant) and 19-15 advantage in the Senate (with one unenrolled).

This month Farnham and four other Republican state senators were targeted in a television ad by the Maine Democratic Party. The ad was missing the collegiality Farnham used to describe her race. It dubbed them “rubber-stampers” of Gov. Paul LePage’s “extreme agenda.”

The decision to run the ad came after operatives crunched the numbers, evaluating party registration advantages, election results and other factors before identifying Farnham’s seat as winnable.

Strategists in both parties have made similar calculations for other swing districts and battleground races. Video, radio and mail ads are queued. Outside interests with a stake in who controls the Legislature may be watching, too.

It’s standard procedure every two years as parties vie for control of the State House, but this legislative election is different.

Maine Democratic Party Chairman Ben Grant has described the battle for the Legislature as “one of the most important elections in the history” of the party. “That’s not hyperbole,” Grant said.

Republicans, who wrested full control of the Legislature for the first time in more than three decades in 2010, say they’ve just started reforming state government. They argue that the initiatives were part of the voter mandate that swept the party into power in 2010. A divided State House in 2013 would blunt their electoral directive, said House Speaker Rep. Robert Nutting, R-Oakland.

Half of seats up for grabs

There are 54 open seats — contests with no incumbent — in the House and 13 in the Senate this election. Some of those districts are considered swing districts, meaning both parties think they can win it. Some races with incumbents are also being targeted.

Grant said the party is eyeing between 30 and 40 races in the House and Senate. Maine Republican Party Chairman Charlie Webster was more vague but said he was confident the party could grow its majority.

So where are the swing districts?

Party operatives aren’t saying. However, publicly available party registration data and electoral history provide some clues. So can the history of money that has been directed to specific races to influence the outcome.

Of the 54 open seats this year, 19 could be battleground races simply because of a narrow voter registration advantage.

Republicans hold seven seats in districts where they have no registration advantage. Three of them will be open contests this election — Districts 111 (Windham), 60 (Topsham) and 47 (Rockland).

The same goes for District 64, where Rep. Kim Olsen, R-Phippsburg, is seeking a second term against Democratic challenger Jeremy Saxton.

Incumbents typically have the edge, but Olsen won the seat by just 74 votes in 2010. Additionally, Democrats have historically won District 64, holding it for four straight terms before 2010.

Rep. Doug Damon, R-Bangor, could find himself in a dogfight in District 16. Damon is facing Democrat John Schneck, a former radio news anchor. Additionally, Damon resides in a district where registered Democrats outnumber Republicans.

Democratic House incumbents also may face tough re-election bids.

District 109 Rep. Ann Graham, of North Yarmouth, lives in a district where Republicans outnumber Democrats 1,944-1,707. Graham, who narrowly won the seat in 2010, is also facing off against Susan Austin, a former representative from Gray.

Democrats also could lose seats they currently hold but are open races this year. Rep. Robert Hunt, D-Buxton, narrowly won District 131 by two percentage points in 2010. His would-be successor Ronald Usher must overcome a disadvantage to beat Republican Donald Marean: There are more registered Republicans in the district.

Republican ‘stampers’ at risk

In the Senate, four of the five Republicans targeted in the recent “rubber-stamper” reside in districts where Democrats have a registered-voter advantage.

In District 32, Democrats have a slight advantage. The party also won the seat in 2008. Gratwick has served three terms on the Bangor City Council. People there know him, but they also know Farnham, a school committee member and former mayor.

Similar tussles could unfold in Districts 15, 17, 22 and 25.

Even if Democrats pick up a few of those seats, they’re poised to lose some elsewhere. The party isn’t running a candidate in District 12, a seat held by Sen. Bill Diamond, D-Windham.

Sen. Phil Bartlett, D-Gorham, is departing District 6, leaving Democrat James Boyle to defend the seat. Boyle will face Republican Ruth Summers, who is considered a rising star in the party and who is married to Secretary of State Charlie Summers.

Other battleground races are as difficult to identify as the outcome of the election. In the end, both sides say, it’s about the policies and the quality of candidates.

Democrats are hoping LePage, a magnet for controversy, will assist their resurgence. The governor already has helped unintentionally with candidate recruitment, Grant said.

“A lot of people don’t like what they see out of him and they’re (more) willing to make the needed sacrifices to run for office,” he said.

Republicans, meanwhile, are confident that their agenda is resonating with voters.

“I don’t see any great change,” Nutting said. “We’ll probably trade some seats, but in the end we’re looking to grow our majority.”