Earlier this month, California Governor Jerry Brown strode to a podium in Sacramento and said something that, a few years ago, seemed as unlikely as a UFO landing atop the state Capitol: The initial projection for the state budget showed a balance. In fact, for the 2013-2014 fiscal year, there’s a surplus of $851 million. The nonpartisan Legislative Analyst’s Office, which just a couple months earlier estimated a deficit of $1.9 billion, concurred with the governor: Revenues matched expenditures in the initial outlook for the first time since before the Great Recession.

This was a surprise, to say the least. After all, in 2009, California carried a deficit as high as $42 billion. Marathon all-nighters in the legislature and unsatisfying 11th hour deals were commonplace. At one point the state paid obligations with IOUs because it ran out of money. How could this bastion of dysfunctional governance deliver a balanced budget?

Actually the answer is quite simple. Progressive Democratic activists identified the straitjacket of rules that had the state tied up in knots, and devised a systematic plan to change them. Through massive organizing, they transformed the electorate and sidelined Republican obstructionists. Now, with surplus money on hand, they’re getting ready to fight a new battle over the next few years: whether to focus on budget balancing and debt reduction, or to continue to boldly invest in California’s future. National Democrats, mired in a series of endless fiscal showdowns in Washington, ought to pay attention: California suggests a way to overcome continual hostage-taking and government-by-crisis.

California’s recent budget problems resulted from the deepest economic downturn since the Great Depression. But the state’s difficulty in addressing them was as much a political crisis as a budget crisis. Since the passage of the notorious anti-tax Prop 13 in 1978, which capped property tax rates and made it nearly impossible to raise revenue through the legislature, California has been locked into a revenue structure that, outside of boom times, proves too small to finance the public services that residents desire. Several tax cuts during the late 1990s dot-com boom, and a huge $5.5 billion annual cut to the vehicle license fee passed by Arnold Schwarzenegger in 2003, only exacerbated this imbalance.

The state also had to contend with multiple veto points that allowed the minority party to control the fiscal debate. Until 2010, the legislature needed a two-thirds vote to both pass a budget and raise taxes, leading to several incidents of brinksmanship with Republicans, who gerrymandered the state just enough (in a corrupt bargain with the majority Democrats) to hold on to a bit over one-third of the legislative seats. Robbed of the tools of budget-balancing, majority Democrats had to make painful concessions in order to get Republicans to pass a budget.