Hours after a report surfaced that Senate candidate Roy Moore initiated a sexual encounter with a teen in the ’70s, the U.S. Senate passed legislation mandating that all senators and their employees go through anti–sexual harassment training.

“What we really need to change is the rules that protect workers, whether they be famous or not,” Sen. Amy Klobuchar, the Minnesota Democrat who sponsored the legislation, told VICE News. “So that’s part of my goal here, and I think the Senate should be an example.”

The bipartisan measure has been in the works for weeks, as a wave of sexual harassment allegations have roiled both Hollywood and the Hill.

California Democrat Rep. Jackie Speier was one of the first lawmakers to come forward, revealing in late October that she’d been sexually harassed and assaulted while serving as a congressional aide decades ago. Last week, three former lawmakers and one current one also told the Associated Press that they’d dealt with sexual comments from their colleagues in Congress. Earlier this week, Michigan Democrat Rep. Brenda Lawrence suspended her chief of staff after four former staffers said he commented on their looks and sometimes tried to touch them without their consent.

Nineteen senators ended up co-sponsoring the legislation, including Senate Minority Leader New York Democrat Sen. Chuck Schumer and Senate Majority Leader Mitch McConnell. It only needed to pass one chamber of Congress and doesn’t make a new law.

“I had to go to some senior members of the Senate and talk about it, and you know, there were still some people going, ‘Well, why? My office is fine,’” Klobuchar said. “And you never know. A lot of these people who ran these offices didn’t know things that were going on.”

Klobuchar called such sexual misconduct “power plays.”

“It brings people down so they can’t lead like they could lead, if they were given the opportunity,” she said. “So just as important as getting out the lewd behavior and people’s feelings and what’s happened, I think is going to be just unleashing the power of a lot of these women — who’ve been really brought down by these kinds of environments and workplaces — to let them succeed.”

The Senate already had sexual harassment training protocols, but until Thursday, senators and staff could opt out of it. Now, they’ll need to go through training within the next 60 days and repeat it at least once during each two-year session of Congress.

The House is also now looking into changing up its lawmakers’ sexual harassment training procedure. The Senate will next look at improving its harassment reporting requirements, Klobuchar said.

When asked if the Moore allegations might have sped up her measure, Klobuchar said they didn’t have too much of an impact, since she’d always planned to get the measure passed by Monday the latest.

But, she added, “It may have been helpful in getting two or three of the members, with only an hour or two to go, to get on board.”

The Washington Post’s bombshell report detailed the accounts of four women who said Moore had pursued them, separately, when they were teens and he was in his 30s. One of the woman said he initiated a sexual encounter with her when she was 14.