For all her generally terrible electoral performance, Hillary Clinton did do well in some unusual places. Broadly speaking, these were rich areas — like Orange County, California, which went Democratic for the first time since 1936, and the Upper East Side of Manhattan, which is chock-a-block with financiers. Of course, it didn't compensate for Clinton falling far behind Barack Obama's margins with the working class, both black and white.

But one place where Clinton managed to hold on was Nevada, where tremendous effort from unusually strong local unions managed to win her the state — and preserve a Senate seat for the Democrats as well. As Democrats think about how to rebuild their shattered party, there is no way around labor unions.

For decades now, America's few remaining strong unions have been locked in something of a codependent relationship with the Democratic Party. As union density has eroded from a third of all workers down to about a 10th, and a mere 7 percent in the private sector, unions have spent tons and tons of money trying to elect Democrats. As of late October, unions had spent well over $100 million on the 2016 election — an increase of nearly 40 percent compared to 2012.

Unions do this out of fear of Republicans, who loathe unions and smash them whenever possible, and out of a desire to remain influential in the Democratic Party. This latter strategy was particularly noteworthy in the Democratic primary, where most of the big, left-leaning unions lined up behind Hillary Clinton despite the undeniable fact that Bernie Sanders was the more pro-labor candidate. (Just examine who was on the picket lines.) The union leadership judged that Clinton was going to win, and got in line so as to preserve their status among the party elite, particularly the notoriously grudge-prone Clintons.

This is a good example of when operational conservatism slides into mere timidity. Sometimes the less risky move is also the bolder, more aggressive one. It was reasonably clear even by the spring that Clinton was an extraordinarily weak candidate and nominating her was a terrific gamble. Had the big unions thrown their weight behind Sanders, he might have won the primary, and quite possibly would be president-elect now — the greatest political victory for labor in decades. At least he could not have done any worse than Clinton.

But more fundamentally, in terms of positive, pro-labor policy, unions have little to show for their loyalty. Since 1976 Democrats have repeatedly sold out the working class with deliberately vicious recessions, trade deals that led to massive outsourcing and job losses, and weak at best domestic policy. In 2009, when Democrats had super-majorities in both chambers of Congress, they barely even tried to pass a card check law which would have made it easier to organize a workplace. Both moderate Democrats and the Obama administration basically gave up on that without a fight.

The calculation seemed to be that since unions can't possibly get behind Republicans, then Democrats can just take them for granted. That way they can cater to big business and Wall Street as well. But they failed to understand that the decline of unions is undermining the party's political strength. Unions are what turn alienated working people into energized political actors and voters.

Both the union leadership and the Democratic Party elites have their priorities skewed. Unions ought to be concentrating almost all their efforts on organizing more people, as Hamilton Nolan argues. Spending tens of millions of dollars to elect a candidate who barely cares about unions, who then proceeded to lose to the most unpopular presidential nominee in the history of polling, was a mind-boggling waste of money. They didn't even manage to deliver their own members, who only went to Clinton by 8 points.

In return, Democrats must understand that without unions, there is no prayer of restoring the party's broad competitiveness. Hillary Clinton did win the popular vote, but at the state and local level the party has been virtually annihilated. Without an organized core of support, they simply cannot contest the right-wing advantage in money and their associated army of ideologues. And when it comes to bedrock left-wing institutions, it doesn't get any more foundational than unions. For centuries they have been the signature way the working class makes its political presence felt.

So Democrats should do what unions want without asking. They should understand that unions' job is to organize, and their job is to make it easier for unions to organize, with credible promises to pass card check, repeal Taft-Hartley, and update the labor law framework, when they get the chance. They must become a labor party, and quick, because the hour is late. National anti-union legislation and legal harassment is probably coming, and public sector unions are going to be hit hard. It will take a furious effort to simply keep labor from being rolled back, much less expanded.

But there are few other places to turn for Democrats, and none with the proven track record of labor. This will mean, of course, losing some of the rich votes Clinton rolled up in Orange County and the Acela corridor. But luckily, there aren't that many rich people, and Trump's pose as a defender of the working class looks for all the world to be a complete sham. Trump is already deeply unpopular, and will become even more so when his presidency sinks into corruption. It should be easy enough to win back most of those union voters who did go for Trump. More important but more difficult, if the party and organizers can help each other to create tens of millions of new union members, they can start winning back political power at every level of government.

This is the fourth article in a four-part series on the Democratic Party. Read the first article here, the second article here, and the third article here.