After months of ­debates and millions of dollars in television ads, Massachusetts voters will render their verdict Tuesday in a US Senate race that offers a choice with deep roots in the state’s rich political history: an outspoken leader on liberal causes against a moderate New England ­Republican pledging to be a beacon of bipartisanship.

US Senator Scott Brown casts himself as representing a rare species, one of the ­dying breed of independent Republican senators who seek to broker peace in a ­divided Washington, in the tradition of Leverett Saltonstall, Henry Cabot Lodge II, and Edward W. Brooke, ­Republicans who represented Massachusetts in the Senate.

Warren is channeling the late Senator Edward M. ­Kennedy’s passion for championing the powerless, promising to be a leader in the Democratic majority her election would help secure, fighting harder than Brown ever would against a system now rigged for the wealthy.

“It is a kind of an endless loop in classic Massachusetts political history over the last century,’’ said Thomas J. Whalen, a political historian at Boston University who wrote a book about John F. Kennedy’s 1952 defeat of Lodge, the Brahmin Republican. That race launched the Kennedy dynasty and gave newfound respectability to the Boston Irish political ­establishment, creating the modern coalition that is now backing Warren, a Harvard Law School professor. “This is like Kennedy versus Lodge, in many ways,’’ Whalen said.

But while Warren and Brown’s evocations of older ­political generations may resonate with like-minded voters here, the meaning of what they promise to bring to a profoundly divided Senate and federal establishment is not as clear. Moderates in Congress are rare and getting rarer, and unvarnished liberals can find their causes have little traction in an ideologically charged arena.

On the trail, Warren often speaks reverently of Kennedy, painting Brown as an unfit replace­ment who is out of step with the late senator’s values.

Brown, who also offers a nod of respect to Kennedy, more ­often invokes figures like Brooke and moderate Republican governor William F. Weld.

Political scientists, historians, and average voters wonder whether Brown’s departures from his party’s orthodoxy are really as bold as he says or are true to the values of the silk-stocking Republicans who dominated the state GOP in the mid-20th century with their blend of fiscal probity and ­social liberalism. Brown has joined Republicans around the country in signing, for example, a no-new-taxes pledge that has often been cited as an obstacle to a bipartisan budget deal that could trim the deficit. While he favors abortion rights, antiabortion groups back him.

They also question whether Warren’s strict adherence to liberal values could leave her unable to build consensus in the mode of Kennedy, who learned how to legislate over 4½ ­decades, before the Senate ­became fully polarized.

Warren has indicated that she would have opposed, for ­example, President Obama’s deal with Republicans to ­extend the Bush-era tax cuts in exchange for extending un­employment benefits in ­December 2010. Kennedy, by contrast, forged deal after deal by swallowing something he did not
like to get something he loved into law. He always seemed able to find a GOP ally.

“Brown has failed to establish himself in the Senate as a powerful moderate. . . . He hasn’t reached that level of statesmanship that people associate with Saltonstall,’’ said ­Jeffrey M. Berry, a Tufts University political science professor.

As for Warren, Berry said, “my guess is that [she] would embrace full-throttled values of modern liberalism.’’

John W. Sears, one of the last survivors of the generation of patrician political figures, said Brown — though in no way a patrician, with the pickup truck and the hard-luck childhood — can claim some of the mantle the old guard passed on to him and to other moderate state Republicans.

“On the whole, Scott has been more imaginative than most current Republican senators, but he is still right-center,’’ said the 81-year old Sears, a liberal Republican who, despite what he says are Brown’s rightward leanings, still plans to vote for him.

Brown, who voted with the Democrats on financial regulation and on repealing the military’s ban on gays serving openly, is often ranked among the most bipartisan members of Congress.

Warren has won the affection of liberals around the country for her ability to articulate why middle-class people feel under siege and why a GOP-controlled Senate would be a disaster, in her view, for ­social programs, for the environment, and for the future of the Supreme Court.

But her history in Washington reflects a tough, uncompromising streak that does not fit neatly with Kennedy’s legacy as one of the great dealmakers in the history of the Senate, said Maurice Cunningham, chairman of the political science depart­ment at the University of Massachusetts Boston.

“Warren has been an outlier in her own party,’’ Cunningham said, referring to her hard-edged questioning of Obama administration officials in hearings on finance reform and consumer advocacy.

G. Calvin Mackenzie, professor of government at Colby College in Maine, pointed to ­Kennedy’s well-known ability to bring others on board.

“Ted Kennedy, for all the fire and brimstone liberalism, was also a guy who could sit down and deal; he could deal with Jesse Helms,” Mackenzie said.

In many respects, the difficulties both candidates could face in the Senate are a result of changes in Washington. ­Decades ago, there were Republicans who stood to the left of Democrats and Democrats who stood to the right of Republicans. Even those on the ends of the spectrum could negotiate without fear of losing their seat to a more ideologically pure replace­ment in a party primary.

The shift toward the modern brand of gridlock dates to the 1970s, when electoral reforms weakened the influence of party leaders, lending more influence to party activists, who were more ideologically driven, Mackenzie said.

Some of the best-known senators today are ideologues who work through the news media to gain a reputation as rhetorical leaders. Warren would face a choice if elected, whether to use her national popularity to become a leader of her party’s left flank or to work like Hillary Clinton did as a senator to ­become a student of the Senate.

Brown would also face a choice — whether to target his votes to build on his reputation for moderation, to work with other moderates to seek a more fundamental shift away from the Senate’s polarization, or to seek to build credibility with his party’s powers by leaning to his more conservative side.

Norman J. Ornstein, a political scientist at the American Enterprise Institute, said there is a sizable group of senators who may be willing to break out in the next session, to seek a more bipartisan path, if several more moderates win election Tuesday, as some polls project.

But Ornstein also believes that giving Republicans majority control would vindicate a GOP strategy of obstruction, designed to win back power by making the dysfunctional Senate the burial ground for Obama’s priorities. He blamed Brown for not standing up, during his two years in Washington, against procedural maneuvers meant to prevent the institution from even debating bills.

“The ability to judge Brown is a little bit more opaque, simply because he has voted with some of those filibusters,” said Ornstein, coauthor of “It’s Even Worse Than It Looks: How the American Constitutional System Collided With the New ­Politics of Extremism.”

The closeness of the race heading into the final two days underscores how torn some voters are ­between these competing visions of how the state should position itself in the ­national debate.

Tim Paikopolos, a 31-year old recent law school graduate from Dartmouth, stands at the fulcrum of that choice. He is a Democrat who says he plans to vote for President Obama against Mitt Romney, but he is undecided in the Senate race.

He fears Warren would fail to challenge her party or work with Republicans, ­because she has aligned herself so firmly with the Democratic base.

“Perhaps her independence would be compromised ­because she’s identified herself as strongly liberal or strongly Democratic,” he said.

Yet Paikopolos also has doubts about Brown, wondering what would Brown do with a full six-year term, when he does not have a well-financed Democrat putting pressure on him? Especially if Romney wins, Paikopolos asks, will the pressure to be “a rubber stamp for the Republican Party” ­become irresistible?