July 27 (Bloomberg) -- There have been many gangs roaming the 16 perilous blocks between the Capitol and the White House, but only one of them mattered: the Gang of Two.

President Barack Obama and House Speaker John Boehner came close to rescuing the nation from a manufactured debt-ceiling crisis last week. But their buddy act fizzled, leading them to deliver starkly different speeches on July 25.

Over the last year, Boehner and Obama have developed a working rapport, if not a friendship. Obama understands what Boehner is up against. Blessed with the luxury of leading a mostly sane party, Obama has more leeway than Boehner to reach consensus. Liberals don’t like it when Obama puts their favorite programs on the chopping block, but they’re not going to riot over it.

Obama has reason to resent Boehner’s use of the debt ceiling -- which has been raised 100 times since 1940 -- to wring concessions from Democrats. But it seems clear that Boehner didn’t know just how far the Tea Partiers in his caucus would push. At times, Obama and Boehner appeared to be members of the same SWAT team, trying to talk the arsonists into dropping their matches.

Deep down, Boehner has more in common with Obama than with the extremists in his own caucus. Both men escaped humble origins. As Boehner has tearfully described it, he grew up sweeping the floor of his father’s bar and delivered newspapers in the dark to get ahead. Obama barely knew his father and was raised by grandparents in a modest Honolulu apartment. They’re both members of a shrinking fraternity of smokers -- you could smell smoke outside the office where Boehner had a pizza party for his troops last week -- although Obama claims to have quit. What’s more, as Obama once joked about Boehner’s peculiar perpetual tan, they are both men of color.

Establishment Creatures

They are also both creatures of the establishment. Boehner’s not a hater, a birther or a stranger to compromise. He admired and worked with Senator Edward Kennedy, and he likes backslapping his way through the marble halls of Congress before slipping into a backroom. In April, after budget negotiations, Boehner said his relationship with Obama had improved. “Clearly, we understand each other better,” he said. Since their Father’s Day weekend golf outing, where the two men reportedly discussed the challenges of raising daughters, Boehner has met secretly with Obama several times.

For both men, compromising to save the country from default makes political, personal and fiscal sense. Obama would be able to put the crisis behind him and campaign for re-election as a centrist and a conciliator: Yes, we can all get along.

For his part, if Boehner could steer his caucus with the Tea Party safely lashed to the mainstream conservative mast, he would keep his party from splintering while also holding onto his job as skipper. As a bonus, he would avoid a financial catastrophe that his party has deliberately courted and for which Republicans still stand to be blamed.

The deal he struck with Obama was so obviously a boon to Republicans, surely even his wild and woolly freshman would have to go for it. Except they didn’t. Even Boehner was shocked that his caucus couldn’t see that $3 trillion in spending cuts up front, coupled with $800 billion in revenue increases -- via loophole-closing at some unspecified later date -- represented a rout of Democrats. Obama understood that his party would be appalled at this skewed result, but he figured there would be insufficient resistance to block it.

Tea Party Intransigents

The resistance came from the right. At least 60 House Republicans have declared that they won’t vote for a debt-limit increase -- for any reason. Although outside experts were brought in to explain the potential consequences of default, including a “death spiral” in the bond market initiated by a loss of confidence, many of the Tea Party intransigents didn’t bother to attend the lecture. In any case, they preferred a potential catastrophe to a deal that would provide political benefits to the president -- even if most of the policy benefits accrued to Republicans.

When Obama called for increasing the revenue component from $800 billion to $1.2 trillion, Boehner had his excuse. He pulled out of negotiations, leaving Obama to complain in an impromptu news conference that he had been left, once again, “at the altar.”

It’s hard to know how much of Obama’s lament was genuine and how much of it was designed to give Boehner bragging rights about how he had bested the president. In any case, it wasn’t enough. Boehner merely gave his colleagues dramatic cuts in spending; what they really want is for Obama to fail, painfully and visibly. For that, higher interest rates, a devalued dollar, cratering stock markets and another recession appear to be a price worth paying. They don’t want to govern; they want to stick it to the man.

Rejecting Spending Cuts

Boehner must navigate a world in which Republicans pass the Ryan budget -- which would increase the debt by $6 trillion over 10 years -- then promptly refuse to raise the debt limit (while rejecting spending cuts beyond their wildest libertarian dreams). Any Republican representative who points out the party’s incoherence -- or merely tries to prevent catastrophe -- can expect a primary from the right. Boehner himself, so conservative he has compiled a lifetime rating of 94 out of 100 from the American Conservative Union, is constantly threatened with a Tea Party primary. Just a few years ago, Boehner was on the right wing of the Republican Party; now, having shown a capacity for compromise with Obama, he’s on its left.

Deal making with Obama is finished. A Gang of Two is more bipartisanship than Boehner’s Tea Party faction can tolerate. Yet in shunning Obama, Boehner doesn’t appear to have won the support of the radicals, some of whom are now demanding that any deal include the nonstarter of a balanced-budget amendment. It’s not clear how Boehner resolves his dilemma. In the end, he may be a lonely Gang of One.

(Margaret Carlson is a Bloomberg View columnist. The opinions expressed are her own.)

Read more Bloomberg View columns.

To contact the writer of this article: Margaret Carlson in Washington at mcarlson3@bloomberg.net.

To contact the editor responsible for this article: Francis Wilkinson at fwilkinson1@bloomberg.net.