The Democratic Party was on the verge of failing a moral and political test. Then its women stepped in.

On Wednesday, several women Democratic senators called on Twitter for Sen. Al Franken (D-MN) to resign in the face of allegations of repeated sexual misconduct. A few male colleagues, and Democratic National Committee chair Tom Perez, joined them shortly thereafter. The tweet swarm came a day after Rep. John Conyers’s (D-MI) resignation, ostensibly for health reasons, as new allegations continued to surface about his own record of harassment.

The allegations against Conyers and Franken had both come out in the past few weeks, as part of a cascade of sexual-harassment and assault victims coming forward to share stories of past harassment by powerful men. For the most part, the men who have been revealed as repeat harassers in media and entertainment have been fired. But those in politics are showing more resistance. Some Republican state legislators have resigned after allegations of sexual involvement with teenage boys, and Republican Rep. Joe Barton (R-TX) announced last week he would not seek re-election as stories surfaced of him harassing a constituent, but other politicians have tried to stick it out.

With a group of women senators calling on Franken — a member of their own caucus — to resign, though, Democrats are beginning to make it clear that they will hold their own accountable.

Months from now, this moment will have seemed inevitable. For years, the Democratic Party has positioned itself as the defender of gender equality and women’s rights against Republican attacks — of course it would take the problem in its own midst at least as seriously as any other institution.

But it would have been easy for Democrats not to. Lawmakers tend not to pressure members of their own party to resign; they much prefer the line that most Republicans are currently taking on Roy Moore in Alabama, that the final decision about fitness for office rests with the voters themselves.

In fact, Democrats very nearly did close ranks around their accusers. The Congressional Black Caucus rallied around Conyers. When Conyers did resign, he claimed it was primarily for health reasons. And because Conyers was attracting more opprobrium than Franken, his resignation could have been taken as an opportunity for Democrats to shut up and hope the problem would go away.

But by showing a willingness to call out their own colleagues, the Democrats turning on Franken have just sent an important message to the members of the diffuse cultural movement that styles itself “the resistance.” They’re communicating that their political party does not just see progressives as convenient partners, but as part of a progressive institution that must not only embody but espouse those ideals.

Countless American institutions are being revealed to have sexual harassment problems: the problem being not only the harassers themselves, but the institutional protection of harassers. For Democrats, that problem was unique: Their pro-woman rhetoric gave them a higher standard to hold themselves to, and would have made their failure all the more glaring. But at least some Democrats are passing the test.

We’ve only just entered a world where being a champion of women means you’re not supposed to be a serial grabber of women’s butts

Franken appears to be baffled by the allegations made against him.

He hasn’t admitted to any of the behavior he’s accused of — he says he doesn’t remember groping a woman in a photo line, and that he remembers a 2006 incident “differently” from the way Leeann Tweeden wrote about it in a November article. But at the same time, he’s apologized to Tweeden and other victims for making them feel uncomfortable. It’s something of an “I’m sorry if you were offended” level of apology, but it raises the discomfiting possibility that the incidents that have come out publicly are just run-of-the-mill for Franken.

Last week, he told a local TV station that he doesn’t know if more women will come forward with allegations, because he wasn’t expecting any women to come forward with allegations, period. That could mean that Franken is trying to defend himself against shoes he knows are going to drop in the future — or it could mean he simply never registered occasions when his behavior overstepped boundaries or made women uncomfortable.

The second possibility shouldn’t be reassuring. To the contrary: It would be an indication that a self-declared progressive feminist — a “champion” of women, as he put it in his initial response to Tweeden’s allegations — did not see “caring about the comfort of women interacting with you in casual settings” as part of the job description.

It wouldn’t be uncommon. We know by now that people who profess to care about gender equality can be serial harassers too. We know that Harvey Weinstein raised money for Planned Parenthood. We know that Leon Wieseltier thought of himself as a champion of women writers and editors. We know that Louis C.K. tried to build a comedy legacy on being a male feminist.

We know, now, that none of the things those men did in public changed the fact that they scared the women around them into victimhood and then into silence.

It’s not like “progressive” institutions have never dealt with this before. Only a few years ago, the progressive nonprofit world was shaken by revelations of widespread and egregious sexual harassment from the owner of a progressive communications firm. The New Republic always positioned itself as a liberal publication and institution (though the nature of that liberalism changed) while Wieseltier was one of its leading lights.

Progressives have been intellectually aware, for years, that genuinely caring about women means allowing them to be comfortable in public and professional spaces — not feeling that they have to be on their guard against predation at all times, and not obliged to accede to coercion by powerful men. But the predation of powerful men and the presence of coercion in progressive circles, just like anywhere else, was an open secret anyway. And now the idea of the “open secret” — the sin that everyone knows about but that has no consequences for the sinner — is crumbling.

The post-Weinstein era has shifted individual attitudes. But it won’t automatically shift institutions’ behavior.

The renewed willingness, among many liberals, to relitigate the 20-year-old question of whether Bill Clinton should have stepped down during the Monica Lewinsky scandal may seem academic. But it’s illustrative.

It shows that progressives are getting uncomfortable with the fact that the institutions they trust to carry out positive social change may have aided and abetted sexual predation in the past. And it shows a conviction that institutions that want to portray themselves as progressive allies ought to hold themselves to the standard that their ideals imply — that the best way to show solidarity with a nascent social movement is to show that you agree with the world it’s trying to create, and that you want to take the first step in making that world a reality.

Because what we’ve seen in the past several weeks really is a nascent social movement. Attitudes toward whether sexual harassment is a bad thing may not have changed radically, but attitudes toward whether it is a problem — and a problem that can be defeated — absolutely have. Many men, including many powerful men with public platforms, have been forced to acknowledge the ubiquity of abuse of power; many women now feel newly empowered to speak out about their experiences, and are now, sometimes, even succeeding in holding their abusers accountable.

This is all happening at the level of individual attitudes being changed and individual abusers being taken down. When change has happened, it’s been because of the collective weight of individual moral outrage. When it hasn’t happened, it’s been because institutions haven’t felt the need to respond to that outrage, and have successfully outlasted it.

Changing individuals’ hearts and minds doesn’t automatically change the institutions those people are part of — either the written rules or the norms that govern an institution’s actions. It takes work to make an organization reflect your values — especially when those values have recently changed, or when an issue seems a lot more important than it used to.

The Democratic Party has embraced the spirit of the anti-Trump “resistance,” its outrage and grassroots energy. But the party and the resistance are not actually the same.

The nature of the relationship between them depends largely on Democrats. They have the opportunity to show that the party is remaking itself to reflect the resistance’s vision of America in which marginalized people are allowed to thrive and subtle and systemic oppressions are taken as seriously as blatant ones.

Or they can maintain a distinct institutional identity and enter an alliance of convenience with the resistance, in which the movement understands Democrats to be better than Republicans but doesn’t embrace them as natural allies per se.

The costs of “living your values” are real. But so are the benefits.

Sometimes, changing your organization to better reflect your values means you will find people in power on the wrong side of those values. It means that people you personally may be loyal to are on the wrong side of those values.

In those cases, you have to make a decision about what the institution really is. Is it about the people who currently belong to it — whatever their faults — or is it an embodiment of the values it espouses?

That’s the choice Democrats are facing right now — and the one that their actions this week show they’re beginning to make, consistently, in the right way.

Their loyalties to Conyers and Franken as leaders within their party would have been strong enough to withstand external pressure to clean house. The only way that Conyers and Franken would be forced out was if Democrats decided that leaders of the party that claims to champion women should, definitionally, not have a history of harassing them.

They made that decision for Conyers. They are making it for Franken. They are making it easier, by making those decisions now, to make the same ones for others who might be revealed to have harassment issues.

Democrats don’t have the power to decide that people who have serially harassed women can be forced out of public life, or out of politics. Republicans aren’t going to clean house just because Democrats do. They may very well not clean house at all. If Roy Moore wins the Alabama Senate election, he’ll probably be seated; the president of the United States will remain a man who has bragged about grabbing women “by the pussy” and has been accused of assault or harassment by more than a dozen women.

This is the nature of civil society, though: No person can dictate whether others live up to his values, or even their own. No organization can either. The only actions they can control are their own.

If you believe that a more just world is one in which sexual harassers lose their jobs, the only way you can act to enforce that norm is to take care of the sexual harassers in your midst.

It’s easy to see this as an act of shortsighted martyrdom: losing power by adhering to your ideals, winning a moral victory while losing the war. But that’s not actually how it works.

The Democratic Party isn’t just attracted to the idea of “the resistance” out of idealism. It’s attracted because that ideal — and the backlash against serial harassers in the post-Weinstein era (to the extent that the two are even different from each other to begin with) — reflects a new energy among certain groups of people (especially middle-aged suburban women of all races) that can be channeled into Democratic politics. Democrats have the power to help solidify the norm against harassment by acting on it — and they have the opportunity to show the resistance that their actions can generate real change, thus encouraging more activism down the line.