BANGOR — Republican Bruce Poliquin held a narrow lead over Democrat Emily Cain in Maine’s 2nd Congressional district race early Wednesday morning.

The former state treasurer from Oakland had 47 percent of the vote to Cain’s 43 percent with 55 percent of precincts reporting in the race to replace U.S. Rep. Mike Michaud, the Democratic nominee for governor.

Poliquin addressed supporters in Bangor just after 11 p.m. Tuesday, saying it’s “going to be a long night.”

Around midnight, Cain entered her party at Bangor’s Hilton Garden Inn to say, “I’m feeling really good about where we are,” and that the campaign would wait until all votes were counted to evaluate its fate.

The race between Cain and Poliquin was expected to be tight after drawing millions in outside spending. The district leans slightly Democratic, but less than Maine as a whole. That led national Republicans to prioritize it as a possible opportunity to pick up a seat.

Cain, a 34-year-old state senator from Orono, won Lewiston and Bangor, while Poliquin, 60, carried many of the district’s rural communities. If Poliquin held on, he would be the first Republican to represent the district since Olympia Snowe gave up the seat in 1995, after she won the first of her three terms in the U.S. Senate.

Poliquin, a Waterville native, addressed a crowd of supporters at his election night party at Dysart’s restaurant in Bangor, saying if he’s elected, the district “will have someone working nonstop” to fix problems in Congress.

“I come from a working-class, middle-class mill town,” he said. “People want someone in Washington who will work hard and advocate for them.”

The result may be affected by the race’s third candidate, independent Blaine Richardson of Belfast. The conservative 64-year-old retired Navy captain had 11 percent of votes.

Poliquin acknowledged that possibility while shaking hands with voters outside the Cross Insurance Center in Bangor on Tuesday afternoon.

“I encourage everybody to go out and vote for Bruce Poliquin, not Blaine Richardson,” he said, “because if you do that, you’re likely going to elect one of the most extreme liberal politicians that Maine has seen in two decades.”

Cain moved to Maine to attend the University of Maine and won her first term as a legislator in 2004. She rose through the ranks there, becoming the Democratic leader in the Maine House of Representatives in 2010 and moving to the Senate two years ago.

“This campaign has been about a positive vision and our real plan for how we want elected officials to help move Maine forward,” she told supporters.

Poliquin has been in Maine politics for four years, losing primaries for governor in 2010 and U.S. Senate in 2012 around a stint as treasurer from 2011 to 2013.

Cain is widely regarded as a deal maker despite a liberal record, supporting the federal Affordable Care Act and a single-payer plan that would go further. She has campaigned on negotiating state budgets and other bills with legislative Republicans.

Barbara Cardone, a 54-year-old lawyer from Bangor, said the Democrat’s focus on consensus-building would make her effective in Congress.

“I think, long-term, she will be a powerful voice for us in the 2nd Congressional District,” Cardone said.

Poliquin touted his private-sector experience, including decades as an investment manager in New York City. He contrasted his experience with that of Cain, whom he dubbed a tax-and-spend liberal.

Cain and Poliquin raised more than $3 million each, with outside interests pouring in nearly $3 million more. By both measures, it’s the most expensive House race in Maine since at least 2000, with much of the money spent on negative television ads.

Polling sites were busy Tuesday, with Maine Secretary of State Matthew Dunlap predicting a 60 percent turnout statewide because of the high-profile governor’s race won by Republican incumbent Paul LePage over Michaud and independent Eliot Cutler.

Dunlap said turnout could be even higher in the 2nd District because of a referendum question that would ban the use of bait, dogs and traps to hunt bears in Maine.

Those activities take place predominantly in the 2nd District, which encompasses 80 percent of Maine geographically and its northern population half. When the question went to voters in 2004, all 2nd District counties voted to reject the law change.

The issue could have helped turn out Republican voters in rural areas where bear hunting is popular and a source of income for guides and businesses. Poliquin has touted his endorsement from the National Rifle Association, using it as a wedge issue against Cain, who supports expanding background checks to all private gun purchases.

At the polls in Newport on Tuesday, independent Dan Stevens voted against the bear baiting referendum, saying guides around his North Woods camp rely on the hunt.

In the 2nd District race, he said he made a last-minute decision to vote for Poliquin over Cain. Why?

“NRA,” he said.

But one of Cain’s main attacks on Poliquin gained traction among other voters. In 2012, he was criticized for putting 10 acres of property on his coastal Georgetown estate in a state tax-break program meant to encourage commercial logging, which a deed on his property largely restricted. He paid $21 on the plot in 2010.

He was never found to have violated any rules, and he eventually moved it out of the program.

Correspondent John Harlow contributed to this report.