It’s a central tenet of democracy: The electorate is a politician’s ultimate boss. If voters don’t like what their representatives are up to, they can, as the saying goes, throw the bums out.

But in recent weeks, as a wave of sexual harassment and assault allegations hits politicians in several statehouses and the nation’s capitol, another force is proving to be as powerful as the electorate: peer pressure.

Two California assemblymen and three members of Congress have resigned in the last two weeks, all facing allegations of sexual misconduct. Each man initially held onto his office for days or weeks after the accusations surfaced. Their resignations came only when their political colleagues called on them to step down.

WhatMatters: Your daily guide to ​California policy & politics.

The degree of peer pressure varied in each case. Still, the resignations point to a major difference between public office and private-sector employment. In movie studios, television networks and some other corporate workplaces, executives have moved swiftly in recent weeks to fire men accused of misconduct. In politics, however, it takes more time for consequences to kick in. And that’s largely because of the collegial dynamics of a legislative body.

“It is challenging. Unlike a voter who is watching from the sidelines, when you are working day to day with someone it becomes a lot more intimate and a lot more awkward,” said Assemblywoman Laura Friedman, who is leading the subcommittee tasked with updating the Assembly’s procedure for responding to sexual harassment complaints.

“We are very tied together,” she said. “We see each other all the time.”

Friedman, a Democrat from Glendale, was one of many assembly members who circulated a letter last month asking for the immediate resignation of their colleague Raul Bocanegra after several women accused him of groping. Bocanegra, a Democrat from Los Angeles, survived for weeks after the first report emerged that he had groped a staff member several years ago. When six more women came forward with similar stories, he said he would not run for re-election after his term concluded at the end of next year.

Several fellow assembly members found that timeline intolerable, and began asking each other to sign the letter asking him to step down sooner. Within days, Bocanegra tendered his immediate resignation.

A similar pattern happened in Washington, D.C., last week with Sen. Al Franken, Democrat of Minnesota. He held onto his seat after the first report, in which a newscaster accused him of having groped and forcibly kissed her a decade ago. Then, after several more women accused him of groping, Franken’s fellow Democratic senators began calling on him to resign. Within 24 hours, he did.

The resignation of California Assemblyman Matt Dababneh was a little different. He stepped down Friday, four days after a Sacramento lobbyist publicly accused him of trapping her in a bathroom and masturbating.

“The allegations made against me are not true,” Dababneh wrote in his letter of resignation. “However, due to the current environment, I, unfortunately, no longer believe I can serve my district effectively.”

Though there wasn’t an organized campaign pressuring Dababneh to step down, his colleagues were disturbed by the allegation and were talking amongst themselves about it, said Assemblywoman Cristina Garcia, one of few lawmakers who publicly called on him to resign.

“Some folks were saying, ‘I’m going to be really uncomfortable working with him,’” said Garcia, a Democrat from Bell Gardens. “That has to get back to him.”

She notes that politicians without allies can’t get much done. They rely on each other to vote for bills, raise money for campaigns and attend political events: “If you have no relationships, you have no political capital.”

Lawmakers are tasked with policing their peers—an expectation that some say would be better handled by an independent body. Both Congress and the state Legislature have procedures allowing lawmakers to formally oust a peer with a vote of two-thirds of the members of a house. But the expulsion process is rarely used. Most of the 20 lawmakers expelled by Congress were ousted in the 19th century because of their loyalty to the Confederacy.

Lawmakers in Sacramento have been reluctant to expel colleagues unless they have been convicted—not just accused—of a crime. In 2014, the California Senate suspended, but did not expel, three state legislators who were charged with felonies including bribery and perjury, citing their right to due process. In the state’s history, California lawmakers have expelled a colleague just five times, according to legislative historian Alex Vassar—most recently in 1905.

“The institution is built so that there isn’t the ability to just swiftly kick someone out. If you did that, you’d be actively working against the will of the people,” said Kelly Dittmar, an assistant political science professor with the Center for American Women and Politics at Rutgers University.

But because voters only weigh in every few years, she said, “you could wind up with someone who is problematic in office for a long time. So the middle road is to pressure them to resign.”

Democrats in Washington are now trying the tactic with Republican President Donald Trump—several have asked him to resign in response to harassment allegations that re-surfaced this week. With their minority status in Congress though, it’s unlikely the Democrats’ drumbeat has much effect on the White House.

Democratic state Sens. Connie Leyva, left, and Holly Mitchell, right, at a women’s caucus event in October 2017. CALmatters photo

What remains to be seen in Sacramento is whether peer pressure will lead to a resignation in the state Senate the way it has in the Assembly. Sen. Tony Mendoza has been accused of harassing young female employees by inviting them to come home with him and sending flirtatious text messages. One staff member said Mendoza brought her to a hotel room when she was a 19-year-old intern and gave her alcohol.

Mendoza, a Democrat from Artesia, denies doing anything wrong. “I am confident that a fair process will reveal that the allegations are baseless,” he wrote in a statement published on his Facebook page last month.

The Senate initially responded to the allegations by removing Mendoza as the chairman of a powerful committee, and making plans to hire an outside law firm to investigate harassment complaints.

This week, however, Senate leader Kevin de León said he has asked Mendoza to take a leave of absence, and Republican Sen. Andy Vidak of Hanford said he will move to expel Mendoza in January.* Their comments came a day after a Democratic state senator said for the first time that she thinks Mendoza should resign. Sen. Connie Leyva said she’s heard from other senators who feel the same way.

“I don’t know if there is a movement necessarily, but I have definitely heard it from some colleagues,” said Leyva, a Democrat from Chino.

She said she’s partly inspired by watching the wave of recent resignations in Washington and Sacramento: “Now that we’ve seen men stepping up and taking responsibility for their actions, I think it’s even more of an impetus for (Mendoza) to step up and do the same thing.”

* This story was updated on Thursday Dec. 14, 2017.