As he announces his retirement Monday, Rep. Barney Frank (D-Mass.) leaves behind a legacy that crosses from legislative cornerstones to political confrontations to a historic place as the nation’s most prominent gay lawmaker.

Love him or hate him — and there were very few who fell anywhere in between — Frank, 71, spent the past three decades crafting a pugnacious personality for the congressional age of television, first in the early days of C-Span’s coverage of the House and later for the 24-7 environment of cable television. Behind the scenes, Frank became one of the most important legislators of his generation on domestic policy, a successful backroom negotiator who won the trust of the Bush Treasury Department and the gay rights movement.

Frank became a touchstone figure in the national political debate in ways that were usually reserved for party leaders such as Rep. Nancy Pelosi (D-Calif.) and the late Sen. Edward M. Kennedy (D-Mass.).

On the left Frank was a hero both for his effort to rein in the nation’s largest banks and for his role in promoting gay rights, having been the first member of Congress to declare his sexual orientation while in office. On the right, Frank became a stand-in, alongside Pelosi and Kennedy, for attack lines designed to gin up conservative activists.

Newt Gingrich’s recent rise in the GOP presidential campaign began, to some degree, six weeks ago when he suggested in a debate that Frank should be “thrown in jail” for his role in pushing the Clinton and Bush administrations to promote homeownership and then in his regulation of the industry.

Never one to hold his fire, Frank returned the retort over the past few weeks, repeatedly criticizing the former House speaker for his role working for Freddie Mac as a seven-figure consultant. “You talk about the ‘L’ word with Newt. Let’s be clear the two words apply to Newt: lobbyist and liar,” Frank said in a recent MSNBC interview, rehashing his role as a chief antagonist of Gingrich’s during his 1990s speakership.

Frank’s stature inside the Capitol dome reached its pinnacle in 2007, when he became chairman of the Financial Services Committee. For the next four years Frank oversaw Wall Street, the housing industry and the multitude of financial firms that packaged questionable mortgages into complicated trading mechanisms.

This placed Frank at the epicenter of the most critical debates of the past five years, beginning with housing legislation in 2007 and 2008 that tried to forestall the industry’s collapse. In the fall of 2008, Frank was the lead House Democratic negotiator for what became the $700 billion bailout of Wall Street, alongside then-Sen. Christopher J. Dodd (D-Conn.).

An openly gay, Jewish liberal representing a district south of Boston, Frank developed a deep trust with then-Treasury Secretary Henry M. Paulson — a Christian Eagle Scout raised in Illinois who went on to run Goldman Sachs.

“Two elements made it possible for Hank Paulson and me to work together despite partisan anger about our cooperation,” Frank wrote in the foreword to the paperback edition of Paulson’s book, “On the Brink.” “First, we trusted each other, admired each other’s integrity and commitment to the public good, and shared a similar and natural understanding of the crisis that faced us, and we were helped by the fact that we were both in power.”

As the first vote on the Paulson rescue plan was failing, some Democratic leaders pushed for GOP leaders to politically break arms to deliver enough votes to push the legislation over the top. Frank told the leaders to end the vote, that passing such a controversial bill in that manner would only make it more unpopular. Four days later, after slight modifications, the legislation was approved. It has remained deeply unpopular ever since, despite what many experts consider its key role in preventing a financial meltdown.

By late 2009, Frank and Dodd began deep, protracted negotiations on legislation that came to bear their names, a rewrite of oversight of Wall Street. The Dodd-Frank legislation tried to create a more transparent financial services industry, requiring more disclosure of exotic derivative trades and creating the Consumer Financial Protection Bureau. In a recent profile, Elizabeth Warren — the former White House aide who helped create the bureau and now a Senate candidate in Massachusetts — marveled at Frank’s forcefulness in the negotiations. With each suggestion, Frank asked those in the room what objections they had, and if there were none, he barked out, “Done!” Those provisions ended up in the legislation.

“That was the first time that I understood, and real well, what it means to be in the room,” she told New York Times Magazine.

Wall Street firms, feeling abandoned by Frank and other Democrats who they believed were their allies, have fought the implementation of Dodd-Frank, and Senate Republicans have vowed to block any appointment by President Obama to the Consumer Financial Protection Bureau.

Over his career, the largest donors to Frank’s campaigns have been firms and executives in the securities, real estate, insurance, legal and banking industries, totalling more than $4 million worth of donations the past two decades, according to the Center for Responsive Politics.

First elected in 1980, Frank became, in 1987, the first sitting member of Congress to publicly reveal he was gay. Since then he has become the leading lawmaker for the gay rights movement, with the most recent achievement coming a year ago with the repeal of the military’s “don’t ask, don’t tell” ban on gay service members serving openly.

In 1990, Frank was reprimanded during an inquiry into allegations involving his relationship with a male prostitute who worked out of the lawmaker’s Capitol Hill townhouse. The panel found that Frank had no knowledge of the illegal activities but disciplined him for using his office to help fix traffic tickets for his partner.

The lawmaker’s wit has made him one of the legendary sparring partners for House floor debates and a sought-after personality in the age of cable television. In February, as the House prepared to approve a bill cutting more than $60 billion from 2011 federal budgets, Frank accused his GOP colleagues of an “orgy of self congratulation” given the legislation’s pending defeat in the Senate.

“Once the Senate gives this awful product an appropriate burial, I will not be a party to its resuscitation,” he said, prompting a shouting exchange with some GOP lawmakers.

In 2009, The Hill newspaper documented Frank’s proclivity for interrupting his TV interviewers, or his fellow guests, if he felt they had slighted him in the least.

Appearing that year with Rep. Michele Bachmann (R-Minn.), Frank said, “I’m sorry, Michele, please don’t interrupt. I know you don’t want to hear this.”

Despite the rhetorical broadsides, Frank prided himself in his ability to find room to compromise with the other side, whether it was Paulson or the Senate. In a preview of his retirement announcement Monday, Frank had grown exasperated with the increasing gridlock in this era hyper partisanship.

“Partisanship is a legitimate concept,” he wrote earlier this year for Paulson’s book, “that has been discredited by the excesses of too many of its practitioners.”