Barney Frank doesn’t gamble with his own money. The man has his vices, but that’s not one of them. On the other hand, he doesn’t mind if you gamble with your own money — he is working to overturn restrictions on Internet gambling — and, more to the point, he’s more than happy to gamble with your money. “I want to roll the dice a little bit more in this situation towards subsidized housing,” is what Frank said in September 2003 when he was warned about the possibility that Fannie Mae and Freddie Mac were precipitating a subprime-mortgage crisis that presented a systemic risk to global finance. “I do not want the same kind of focus on safety and soundness that we have in OCC [the Office of the Comptroller of the Currency] and OTS [the Office of Thrift Supervision].” As it turns out, an overzealous “focus on safety and soundness” was not among the problems to be found in the two book-cooking, bonus-padding, dodgy-debt-dealing government-sponsored enterprises (GSEs) that had come to dominate the American mortgage industry.

Now chairman of the House Financial Services Committee, Frank has a hand in everything from mortgage lending to Internet poker to insurance to the Troubled Asset Relief Program (TARP). He’s a true believer in government’s using a heavy hand in housing and banking, but, while working his way up through the committee, Frank was careful to play both sides of the banking game. He can deliver jeremiads denouncing the greed and excess of Wall Street on the macro scale, but on the micro scale, he’s been careful to offer favors and deal-sweeteners to the institutions immediately answerable to the laws his committee writes — a classic carrot-and-stick regulator.

For example, Frank threatened to use his seat on the Financial Services Committee to punish a Boston-based banking group that wasn’t making enough subprime loans to suit him, back when subprime loans were fashionable. But his work in behalf of Internet gambling is a favor more to the bankers than to the offshore casino operators — it would have cost U.S. banks hundreds of millions of dollars to monitor gambling transactions, and they’ve lobbied hard against the law. Liberalizing Internet gambling won’t cost Frank anything and will spare the banks hundreds of millions in expenses. The tangential politics of gambling are pretty sweet for Frank, too: “It’s a wedge issue for the Republican party,” he explained. “It puts the Republicans in a bind between hardened conservatives and another strong group of theirs. If you look at people who say keep the government out of my business, say don’t interfere with my personal freedom, don’t over-regulate business, and let’s have freedom on the Internet, this bill is the worst example of a violation of all of those.” That’s how Frank does business on the Financial Services Committee, ignoring the big picture in exchange for a steady stream of tangible benefits — a little money for a low-income project here, a campaign donation there.

Barney Frank, in his own words, likes to roll the dice. The problem is that when it came to subprime mortgages, he was betting the stability of the world financial system on those dice, and the dice came up snake eyes. It’s not as though Frank & Co. hadn’t been warned — and not just by market fundamentalists and Republican partisans. When he talked about rolling the dice, Frank was responding in part to the concerns raised by Greg Mankiw, a Harvard professor and one of the most influential economists of his generation, who at the time was serving as chairman of the Council of Economic Advisers in the Bush administration. Mankiw argued that the GSEs’ lines of credit with the federal government, while mostly symbolic, gave the impression that Washington was backstopping these privately owned businesses. This was obviously unfair, as Mankiw saw; more important, it was dangerous. How high were the stakes? Trillions of dollars later, now we know.

Mankiw wasn’t speaking econo-gobbledygook. He spelled out the situation in language that even a congressman can understand: “This situation raises concerns over fairness, but in my view, the larger issue for the policymaking and regulatory community is that the subsidy creates a source of systemic risk for our financial system,” Mankiw said in a November 2003 speech. “This risk arises because the subsidy has allowed the GSEs to become gigantic. From 1995 to 2002, the debt issued by the housing GSEs more than tripled. As of the end of 2002, their total reported debt was $2.2 trillion. To put this in perspective, the privately held debt of the federal government is $3.2 trillion. If recent trends continue, GSE debt will soon exceed the privately held debt of the federal government. The GSEs have used the proceeds from issuing debt to amass enormous portfolios of mortgages and mortgage-backed securities. For example, according to data from Fannie Mae, Fannie and Freddie held more than one-quarter of all outstanding mortgage-related securities as of the end of 2002. As a result, Fannie and Freddie now have major interests outside the business of securitizing mortgages. They are now also in the asset-management business, with their financial health depending heavily on the performance of these portfolios of mortgage-backed securities.” Mankiw did everything short of drawing Congress a map with a legend reading, “Here be monster debt.”

But Barney Frank was having none of it. He’d been a powerful voice against reform of the GSEs back in 1992, when he had helped hobble Rep. Jim Leach’s move to create a strong regulator for Fannie and Freddie. Instead, they got the Office of Federal Housing Enterprise Oversight (OFHEO), a weak regulator — but not weak enough for Frank’s tastes: When OFHEO warned in 2004 that there were problems at the GSEs, Frank joined up with those masters of finance Maxine Waters and Lacy Clay in hearings at which OFHEO was accused of attempting “the political lynching” of Fannie Mae CEO Franklin Raines, who is black — and who was paid nearly $100 million as he ran his GSE into the ground. Imputations of racism have long been a standard part of the arsenal used to beat mortgage bankers into political submission and have regularly been deployed against critics of Fannie and Freddie. The same ugly politics derailed a 2000 reform effort led by Rep. Richard Baker (R., La.), again with Frank serving as the anchor of a largely unified Democratic opposition. At the time, Frank was positively contemptuous of the notion that taxpayers might end up on the hook for Fannie/Freddie excesses, declaring that there was “no federal liability there whatsoever.” Actual federal liability: $100 billion and rising, and some analysts expect it to top $200 billion. The total cost, which must include the subprime bubble’s damage to the broader economy, is probably incalculable, but easily in the trillions of dollars. Put another way, the subprime meltdown and its aftermath will end up costing the United States more than World War II did. Roll the dice? This is a little bit more than a lost weekend in Vegas.

Particularly cynical was Frank’s opposition to a reform package in the 109th Congress, another Baker-led effort. Rep. Tom DeLay attached a provision that would have prohibited certain nonprofit groups from receiving federal affordable-housing funds. The obvious intent was to keep taxpayers’ dollars out of the hands of the likes of ACORN and other left-wing “community organizing” outfits. Frank, in a show of brazen chutzpah, painted this move as an attack on the Catholic Church and voted against the bill. He put out statements that DeLay’s amendment would exclude “the Catholic Church’s housing arm,” thereby undermining programs that are “an important source of affordable housing, particularly for seniors.” Frank’s tender concerns for the Catholic social mission have been notably narrow — see, for instance, his indifference to his home state’s ugly shutdown of Catholic adoption services — but he is quite tight with an outfit called the Union Neighborhood Assistance Corp., a Boston-based affordable-housing lobby that has helped to arrange billions of dollars in housing loans and once was accused by the Fleet banking group of extortion. But Fleet wasn’t up against just a bunch of lefty rabble-rousers — it was up against Frank, a powerful member of the banking committee, too. So Fleet gave in, ultimately, setting up an $8.5 billion program for low-income/subprime borrowers. Frank leaned hard on the bank, complaining to Fleet that he’d had “dozens” of constituents complain to him about its practices. Frank had earlier threatened to hold up Fleet’s merger with BankBoston until he was satisfied that the bank was writing enough mortgages in poor neighborhoods — which is to say, largely subprime mortgages. It wasn’t just the much-lamented Community Reinvestment Act that was warping banks’ lending practices.

Frank now protests that he and fellow Democrats were in fact reform-minded but, being in the minority, were powerless to do anything. The historical record simply does not bear out his claims. Especially notable is that in 2003, when it already was clear that the GSEs’ managements (particularly that of Freddie Mac) were less than scrupulously honest and that all the wobbly debt on their books threatened to become a millstone around the neck of the world economy, Frank still opposed real reform. Specifically, the Bush administration proposed giving the Treasury Department the power to supervise the GSEs and to set new capital-reserve requirements for them — a power that, at the time, was held by Congress. An independent auditor already had concluded that Freddie Mac had engaged in multibillion-dollar accounting chicanery in order to boost executives’ bonuses, while other analysts were concerned that neither of the firms could withstand a serious rise in interest rates or mortgage defaults. The New York Times called the Bush-administration proposal a plan for “the most significant regulatory overhaul in the housing finance industry since the savings and loan crisis a decade ago.” Frank’s response was pure denial: “These two entities — Fannie Mae and Freddie Mac — are not facing any kind of financial crisis,” he told the Times. “The more people exaggerate these problems, the more pressure there is on these companies, the less we will see in terms of affordable housing.” The problems were real, contrary to Frank’s misdiagnosis. And housing is suddenly a lot more affordable than it was, too.

Each of the significant reform pushes — 1992, 2000, and 2003 — saw vehement Democratic opposition, with Frank front and center. Reformers were accused of catering to the GSEs’ critics on Wall Street at the expense of the poor — except when Republicans were being too soft on the poor: Incredibly, after spending eight years denouncing them as mindless tools of the rich, Frank now argues that it was George W. Bush and his administration who “pushed home ownership for very poor people.” From patrician plutocrats to tribunes of the plebs in nothing flat — how the mighty fall!

The GSEs, and the financial system at large, still are in need of real reform. They remain in the dangerous position of being nominally private and profit-oriented enterprises with lines of credit at the Treasury and the backing of the federal government. But they are such a rich source of capital for politicians and their projects that there is no appetite for really reforming them — or, as should have been done years ago, truly cutting them loose from the federal apron strings.

So it’s not clear that Frank and his fellow Democrats have learned the lesson of the subprime meltdown. Frank still gets excited about executive-pay caps and other populist issues — for a while, he and Tim Geithner were talking about trying to force TARP’s compensation rules onto every U.S. financial-services company, and possibly onto non-financial companies, too, regardless of whether they’d taken TARP funds. Prior to the collapse, Frank’s main criticism of Fannie and Freddie was that they had awarded huge bonuses, which he lamented even while declaring that “Fannie and Freddie are fundamentally sound” and that “they are not in danger of going under.” Barney Frank isn’t stupid, but he may believe that his constituents are: Ritual denunciations of the rich make angry progressives smile through the tears of rage, and the mad salary-cap talk doesn’t worry too many people on the Hill, since nobody thinks such proposals have a serious chance of ever being enacted. So Frank and the Democrats still frame the issue as their championing the poor against the rich bankers. In truth, it’s been the opposite: A lot of well-connected Washingtonians and Wall Streeters got rich off of Fannie and Freddie, and taxpayers, including poor taxpayers, got stuck with the bill.

And they especially got stuck with bills belonging to friends of Barney Frank. Under the original TARP provisions, for instance, cash injections were supposed to go to banks that were relatively healthy. But the implosion of Fannie and Freddie shares delivered a crippling blow to the capital of OneUnited, a Boston-based bank that had long maintained a friendly relationship with Frank — and with Maxine Waters, whose husband had been on its board of directors until 2008. So Frank had TARP rewritten in committee, inserting provisions designed to channel millions of dollars in relief specifically to OneUnited. Frank then spoke to federal regulators on behalf of OneUnited, in order to make sure that the message was received. He told them it would be a “social tragedy” if the minority-owned bank were to be wiped out by its bad investments. The taxpayers’ cash was duly dispensed, and OneUnited was last heard from haggling with federal regulators over whether it had acted improperly in buying a Porsche for the use of its executives. Greed is good for Friends of Barney.

So, why Barney Frank? Why did he end up being the face of everything the Democrats did wrong leading up to the subprime meltdown? He is not a fool, and even among his enemies nobody argues that he’s on the take. But what was going on at Fannie Mae and Freddie Mac was scandalous — scandalous in a big, extravagant, ugly way. The weird thing about Barney Frank — one of the weird things about Barney Frank — is that he’s basically immunized against scandal. He’s like one of those medieval doctors who got so deep into plague country that nothing could touch them. It’s hard to think of another congressman who would have survived the revelation that he had had recourse to a prostitute, had taken the prostitute into his home, had hired the prostitute as a congressional aide, had written letters to probation officers in the prostitute’s behalf on congressional letterhead, and had had a gay whorehouse run out of his Capitol Hill home, with the whole circus coming to an ugly public climax when the prostitute, inspired by a viewing of Mayflower Madam, tried to sell his story to the Washington Post.

For a normal politician, that’s the sort of scandal that keeps your great-grandkids out of politics. But Representative Frank was one of two openly gay members of Congress at the time, and, strangely enough, his homosexuality muffled the scandal rather than amplifying it, probably a consequence of the 1980s assumption that gay men were more or less uniformly promiscuous — the soft homophobia of low expectations. Frank not only weathered the scandal, he turned around and won his next election with 66 percent of the vote, and nobody has come close to touching him since.

For the general public, the hustlers at Fannie and Freddie are a far bigger problem than was the one in Frank’s bedroom — but their hustle was hard for most homeowners to understand. Prostitution is universally familiar; high finance is arcane, with instruments so complex that the specialists who trade them often fail to truly comprehend them. If Barney Frank wasn’t going to get run out of office over something as straightforward as a prostitution scandal, he sure wasn’t going to get into much trouble for being insufficiently hawkish on the debt-to-capital ratio at Fannie Mae. Within a few years of the prostitution revelations, Frank was so inoculated against scandal that he could carry on his Fannie Mae shenanigans while he was romantically involved with a high-ranking Fannie official. Frank’s longtime beau, Herb Moses, was known to introduce himself as the sole member of the congressional gay spouses’ caucus, which led to accusations that Frank suffered from a deep conflict of interest.

Frank is acid-tongued, self-righteous, and generally unbearable, but even his harshest critics don’t think he’s a crook — he’s mostly a true believer when it comes to federal intervention in the housing market, and as such he has provided convenient cover and a congressional cat’s-paw to the rogue’s gallery of self-dealing, crooked, and cracked miscreants who rode the Fannie/Freddie gravy train.

There are rules for gamblers, Kenny Rogers’s famous formulation — “Know when to hold ’em, know when to fold ’em” — being the most famous and tunesome. But there is a more fundamental rule for gamblers, a First Commandment, and the failure to heed it is the cardinal sin among gentlemen of chance: Know what game you’re playing. Representative Frank thought the game was about housing. It wasn’t. It was about the bond market, and Fannie/Freddie’s crackpot plan to dominate it.

‘Iused to think that, if there was reincarnation, I wanted to come back as the president or the pope or as a .400 baseball hitter,” Clinton henchman James Carville once said. “But now I would like to come back as the bond market. You can intimidate everybody.” There’s a lot to be gleaned from that statement beyond the fact that James Carville should never have been allowed anywhere near the levers of power. The bond market does what voters and their representatives cannot: It punishes governments for financial buffoonery, and it often does so swiftly and ruthlessly.

Fannie Mae and Freddie Mac thought they had a shot at becoming the bond market. It was not long ago that the U.S. government was expected to be running surpluses, or near-surpluses, for the indefinite future. The folks at Fannie and Freddie calculated that this meant that Washington was going to be selling fewer Treasury bonds than it had been, and that the GSEs’ bonds, with their implicit federal backing, would be able to fill the void, in effect displacing Treasuries as the new benchmark for the bond market. Issuing the benchmark bond, the GSEs would be able to borrow at the “risk free” rate, i.e. what the U.S. government pays to borrow. With a line of credit at the Treasury, the implicit backing of Uncle Sam, and the power that comes from issuing the benchmark in the all-powerful bond market, the GSEs — privately owned corporations, bear in mind — would have enjoyed a combination of political and economic power normally reserved for entities that have armies and navies. Fannie and Freddie were so sure that they’d end up stealing Treasuries’ pride of place that they trademarked the name “Benchmark Bonds” and began issuing them.

“You have to go back to mid-2004 or so,” says one longtime GSE watcher. “They were really flying high, especially that 2004-to-2007 run. What they were after, trying to become the new benchmark bond, would have made them untouchable. Congress wouldn’t dare try to regulate them.”

Of course, it didn’t work out quite like that. Federal deficits returned, and with them a flood of Treasury bonds. And the market for Fannie and Freddie paper isn’t what it used to be. But Congress still doesn’t dare try to really reform them. Fannie and Freddie still are limping on, zombies in search of new victims. As usual, the victims are us: James Lockhart, director of the Federal Housing Finance Agency, Fannie and Freddie’s regulator, in late July announced the bad news in classic finance-speak: “Some assets and senior preferreds will have to be left behind as they come out of conservatorship, and that means some of those losses will never be repaid.” In English, that means: They aren’t going to pay us back, at least not all of what they owe us. We bet on deadbeats, and we lost. But Representative Frank is still at the table, dice in hand, feeling lucky, and it’s still anybody’s guess whether he’s figured out what game is being played on him, and on us.