The original version of this post is here. This version covers the full debate, up to Wednesday's passage of a final deal.

Once upon a time, there was a budget surplus.

A big budget surplus, in fact. In July 2000, the Congressional Budget Office estimated that if discretionary spending kept growing at the rate of inflation, the next 10 years would see a combined surplus of about $2.8 trillion. Revenue would stay the course, and spending would actually decline gradually:

That $2.8 trillion was a lot of money, and politicians quickly started debating how to use it. During the presidential campaign, Democratic Vice President Al Gore proposed using it to fund modest ($480 billion) tax cuts, retirement savings incentives, college aid and measures to reduce poverty. And he wanted to pay off the national debt by 2012 by ensuring that all surpluses in Social Security and Medicare went toward that purpose, with the interest savings going to shore up those programs. You may not remember the plan, but you probably remember its name:

Election winner George W. Bush had other ideas. The Republican president drew up a $1.6 trillion tax cut plan, featuring across-the-board rate cuts, with the top rate going to 33 percent, and the eventual elimination of the estate tax. He didn't get everything he wanted. Negotiations with moderate Democratic senators, particularly Finance Committee chair Max Baucus of Montana, cut the package down to $1.35 trillion, raising the top rate to 35 percent and eliminating the estate tax gradually. The Democrats weren't trying to stop it, just to, in Beyoncé's words, tone it down:

But Bush couldn't get the plan through a filibuster, so he instead used the budget reconciliation process. However, under the "Byrd rule" (named after former Senate Majority Leader Robert Byrd), a bill cannot pass through reconciliation if it raises the deficit in the years after the current "budget window," which ended at the end of 2010. If Congress had made the cuts permanent, Byrd — who was still in the Senate — would have been all:

Or, more important, the Senate parliamentarian probably would have been like that. So the bill was written to expire on Dec. 31, 2010, so as not to run afoul of the Byrd rule. ''The White House does think the cuts should be permanent," Bush spokesman Ari Fleischer said at the time. But due to a quirk in Senate rules, they weren't.

Then, in 2003, Bush wanted more tax cuts. Specifically, he wanted to speed up the 2001 rate cuts and then throw in cuts to taxes on capital gains and dividends for good measure (also set to expire on Dec. 31, 2010). And because Republicans had gained seats in the 2002 midterms, passing those measures wasn't too difficult. So, soon enough we had double tax cuts, all the way across the sky:

Flash forward to 2010:

It's December 2010, and Republicans have both retaken the House and shrunk the Democratic majority in the Senate enough that breaking filibusters without Republican support would be out of the question. President Obama has exactly one more month to use his party's 59 senators and 255 House members at his disposal. Suffice it to say, we don't have a surplus anymore. And the Bush tax cuts are set to expire at the end of the month.

Obama doesn't like the Bush tax cuts. During his 2008 presidential campaign, he urged that they be expired for income over $250,000. And he still wants that. What's more, since he can threaten to let all the cuts expire, he has a lot of leverage for getting what he wants. In normal circumstances, he'd be all:

But at this particular moment, the economy was more like:

Or, more to the point:

Obama really, really didn't want to see the middle-class portions of the cuts expire. So he cut a deal with Republicans wherein all the Bush tax cuts — and some tax provisions in the stimulus package — were extended for two years, an expansion of unemployment benefits was extended for one year, and a payroll tax cut was put in for 2011. Then, at the end of 2011, faced with the expiration of the unemployment benefits expansion and payroll tax cut, the economy was all:

So Congress extended them again. But between the tax cuts and the huge economic meltdown and the "invading and running two foreign countries for a while" stuff, the debt started to look like this:

So when Obama asked for an increase in the debt ceiling so that the United States didn't default on that debt, Republicans were all:

They demanded a serious debt reduction deal -- but no tax increases allowed -- if they were going to let the debt ceiling rise. If the ceiling didn't rise, that would have meant that debt-holders wouldn't get paid, since there was not enough tax revenue to pay them off while keeping the basic functions of the federal government from ending. So the markets were like:

But the Republicans replied:

So they and Obama got negotiatin'. They landed on a deal wherein $900 billion in cuts to discretionary spending were agreed to immediately, but a "supercommittee" comprising members of Democrats and Republicans from both Houses was tasked with finding $1.2 trillion more in deficit reduction. If they didn't, then $1.2 trillion in automatic cuts would be enacted on, Jan. 1, 2013.

The supercommittee thought long and hard:

And then failed. So Jan. 1, 2013, was set up as doomsday. The 2001 and 2003 tax cuts would expire. So would the payroll tax cut, the unemployment insurance extension and the stimulus tax cuts that Obama got at the end of 2010. And as if that weren't enough, the $1.2 trillion in automatic cuts that no one wanted would take effect. Put it all together, and that might cause another recession and make unemployment spike up to 9.1 percent, more than a point above where it would be if none of these policies hit on Jan. 1:

Source: CBO

But at the same time, it would basically eliminate the nation's debt problem,and put us back on track to the surpluses that prompted the policies that set this all into motion in the first place (see lower line):

Source: CBO

Policymakers don't like unemployment or recessions, but if the past few years are any indication, they like debt even less (whether that's a smart priority is another question). So this whole situation confused them. They could stop the policies, extending the tax measures for another few years and delaying the automatic cuts. But that would drive up the debt. Or they could let them take effect, and watch the economy take a dive. It was all very perplexing and emotional:

The situation would have changed a lot if Obama's 2012 GOP challenger, Mitt Romney, had won. He and the Republican Congress would have likely implemented sharper tax cuts and made up for it with entitlement reform. But then Obama got reelected:

So we were back to the same players who passed the cuts that got us to the "fiscal cliff." For weeks, Boehner insisted that he would agree to get revenue only by limiting deductions for high earners. The White House wasn't so into that. They argued that you could get, at most, $450 billion over 10 years from such a policy. But then, in the middle of December, Boehner folded:

He agreed to raise tax rates on income over $1 million a year. It's not what Obama wanted; he was insisting on increases on income over $250,000 a year. But it signaled that Republicans were willing to give up some tax revenue to get a deal done.

But just as progress looked like it was getting made, Boehner abandoned talks and put together a smaller proposal, christened "plan B", which combined cuts to low-income programs and making the Bush tax cuts permanent for income under $1 million. The White House wasn't too keen on the plan, nor was the Senate, but the hope was to pass the House and put Obama and Senate Majority Leader Harry Reid in the awkward position of not moving forward on an already-passed deal.

But then plan B failed before coming to a vote in the House, as it became clear that Boehner couldn't put together the votes to pass it:

So he dropped out of talks, and Senate Minority Leader Mitch McConnell took over for the Republicans. But McConnell and Harry Reid didn't jibe well, so Reid dropped out and Vice Presidenr Biden took his place. He and McConnell got to hashing out a smaller deal. After some give and take:

The two sides arrived at $450,000 as the income cutoff for higher tax rates. In the Obama-Boehner talks, therewas some discussion of spending cuts such as an increase in the Medicare retirement age or the adoption of "chained CPI" as a way to cut Social Security:

But ultimately Biden and McConnell gave up on a "grand bargain" that would include new spending cuts, perhaps in exchange for Republican concessions on the debt ceiling, which is set to be reached in late February.

So instead, they landed on a deal that extended the expiring parts of the 2009 stimulus law for five years, indexed the Alternative Minimum Tax to inflation permanently, implemented a Medicare "doc fix" for one year, increased the estate tax ever-so-slightly, and made the Bush tax cuts permanent for income under $450,000 ($400,000 for single people). It passed the Senate easily, with 89 votes.

For a while, House Republicans seemed like they wouldn't pass the deal:

But after a few hours, they relented, and the fiscal cliff was averted.

Except that it only delays the sequester cuts for two months, when the debt ceiling is due to be hit. So we have another cliff at the end of February.

Obama insisted that he won't negotiate on the debt ceiling, that he'll respond to any Republican demands for more cuts at the end of February with:

But by setting that deadline at the same time as the sequester expiry, he's going to be put in the awkward position of trying to put together a replacement for the sequester cuts (a replacement which House Republicans will likely demand include other spending cuts) at the same time that he's demanding an increase in the debt ceiling. So it'll probably get roped into talks, whether he likes it or not.

In short, the fiscal cliff was "averted" the way that Jay-Z "retired" in 2003. It wasn't, and it'll come back shortly, and the comeback will be pretty bad. Hooray!