WASHINGTON — Senator Jeanne Shaheen rose to prominence in New Hampshire as a moderate Democratic governor, liberal on social issues and more conservative on fiscal matters, and willing to work with a Republican-controlled legislature.

But since she rode that reputation to the US Senate five years ago, she has assembled a voting record that is practically indistinguishable from the Senate’s most partisan Democrats.

Shaheen’s solidly Democratic voting record — 97 percent with her party between January 2013 and March 2014, according to a Washington Post database — has become a central issue in her reelection bid. She faces challenges from several Republicans, including Scott Brown, the former senator of Massachusetts, a self-described moderate who voted with his party 66 percent of the time during his last two years in office.

Shaheen’s votes with the Democratic leadership span multiple controversies. She voted against a measure to force President Obama to approve the Keystone oil pipeline, in favor of expanded background checks for gun buyers, and she supported her party’s budget bill.

Republicans point out that Shaheen attacked John E. Sununu
, former Republican senator, in their 2008 campaign for voting 90 percent of the time with then-President George W. Bush.

Shaheen defended her votes, saying in an interview that she is “happy to put my bipartisan record against any of my opponents. . . . I have taken my bipartisanship to Washington with me. I have learned that the way to get things done is to work across the aisle.”

Her staff has assembled a 13-page memo on her bipartisan efforts, and Shaheen pointed to accomplishments beyond her voting record to make her case. In addition, she voted against an Democratic bill imposing an Internet sales tax, a significant issue in New Hampshire, which does not have a sales tax.

New Hampshire is regarded as a swing state, but it recently has been tilting more Democratic, especially in presidential elections. Shaheen’s ability to win reelection as a party-line Democrat will test just how far the state has swung, particularly in a year where her party is expected to fare poorly at the national level.

“The senator has had a long record, a reputation, for being pragmatic and being able to work across the aisle at the state level when she was governor,” said Wayne Lesperance, professor of political science at New England College. “In Washington, that doesn’t seem possible. She’s become much more aligned with the president’s agenda.”

Republicans have tried to tie Shaheen to Obama, whose job approval rating in New Hampshire was only 36 percent in one recent poll. In particular, they have accused her of employing blind party loyalty in supporting the Democratic president’s health care law, their prime target.

Jennifer Horn, New Hampshire’s Republican chairwoman, accused Shaheen of “serving as a rigid partisan and a rubber stamp for President Obama’s failed policies.”

In March, Shaheen supported a nominee to lead the US Justice Department’s civil rights division, Debo Adegbile, even as eight other Democrats joined Republican opposition to defeat him because of his help with an appeal on behalf of a prisoner convicted of killing a Philadelphia police officer. Shaheen said Adegbile is qualified, had a limited role in the case, and that even abhorrent criminals are entitled to a defense.

Yet even as Shaheen seldom casts votes against her party, she is not necessarily viewed as the face of it. Political observers in New Hampshire said Shaheen has been able to keep her pragmatic reputation by focusing on local issues such as preventing military base closures and funding bridge repairs.

“She’s not an Elizabeth Warren type of hyper-Democrat ultimately,” said Dante J. Scala, a political science professor at the University of New Hampshire. “On the one hand, she is quite clearly a partisan actor. But she is a politician with an innate sense of caution and moderation and takes pains not to get too far out in front of her constituency.”

On national issues, she has tended to focus on less ideological bills, such as a proposal to move the country to a two-year budget cycle, that have allowed her to lure bipartisan cosponsors.

As a result, Shaheen has not become as much of a leader on broad national issues as Senator Kelly Ayotte, her Republican counterpart from New Hampshire, who was elected in 2010 and has become a fairly prominent voice within the Senate.

Shaheen and Ayotte were notably cooperative in joining a small bipartisan group that pushed to end last fall’s government shutdown. Shaheen noted that a bill she sponsored with Senator John McCain, the Arizona Republican — it granted more special visas to civilians in Iraq and Afghanistan who helped American forces — was the only measure to become law during the shutdown.

In some respects, Shaheen’s voting record underscores the increasingly partisan nature of the Senate, in which both parties pressure their members to remain loyal on nearly every issue, and few bills become law. By the time a vote is taken on the Senate floor, Democratic leaders who control 55 of 100 seats have usually garnered near-unanimous support from their party, as they attempt to gather 60 votes to overcome Republican filibusters. Republicans, meanwhile, usually vote in unison to halt the action.

Shaheen sided with Senator Richard Durbin, the Illinois Democratic whip charged with enforcing party discipline, 95 percent of the time in the current Congress, which began in January 2013. She voted with Warren, the unofficial leader of the party’s liberal faction, 93 percent of the time, according to the OpenCongress database.

Ayotte voted 85 percent of the time with her party, and has a reputation as a moderate.

Brown voted with Republicans 66 percent of the time during his final two years representing Massachusetts in the Senate as he tried unsuccessfully to hold a seat in a heavily Democratic state. In the year he served before that, Brown voted 81 percent of the time with Republicans.

His most well-known departures from the party: his 2010 vote to repeal the military’s “Don’t Ask, Don’t Tell” policy and his vote in favor of the Dodd-Frank financial overhaul, in which he was criticized by some for weakening some of its regulations on banks.

The Shaheen reelection campaign is one of several highly watched races as Democrats fight an increasingly challenging battle to retain control of the Senate. Other Republican contenders in the New Hampshire race include former US senator Bob Smith, former state senator Jim Rubens, and conservative activist Karen Testerman.