House and Senate negotiators have reached a deal on a sexual harassment bill that would hold lawmakers personally responsible for harassment and retaliation.

The compromise comes after months of bipartisan, bicameral talks, led by Sens. Roy Blunt (R-MO) and Amy Klobuchar (D-MN) on the Senate side and Reps. Gregg Harper (R-MS) and Robert Brady (D-PA) on the House side.

The negotiations had stalled earlier this year primarily over whether members of Congress should be held personally liable for harassment and discrimination, as stipulated in the House bill, or only for harassment, as written in the Senate version of the bill.

In the end, negotiators agreed to drop “discrimination.”

“It really was all about harassment and individual activity, and discrimination is much broader and much harder—certainly, people are still protected if they’re discriminated against, but they’re protected like they would be working for any other employer,” Blunt told reporters on Wednesday. “And it’s harassment, but it’s harassment for the entire range of protected classes. So it’s not just sexual harassment, but race, the other protected-class categories.”

Rep. Jackie Speier (D-CA), who helped lead the effort to pass the House version of the bill, has pledged to work with Democrats and Republicans in the new Congress to address discrimination.

Other provisions in the bill include an end to what amounts to a 90-day waiting period for an accuser to seek a hearing for a complaint, requires public reporting of settlements and awards including the name of a member of Congress if they are liable, extends protections under the Congressional Accountability Act to unpaid staff, requires a survey of staff each Congress on workplace culture and requires the Office of Compliance to create an electronic system take taking in and tracking claims of alleged victims.

"Our bipartisan, bicameral legislation—which we expect to pass in the coming days—will overhaul this broken process, ensure victims can immediately seek justice, and hold Members of Congress accountable," Klobuchar said in a statement.

In a joint statement, Harper and Brady said the bill sets a "positive example for the nation."

“The agreement reflects the first set of comprehensive reforms that have been made to the Congressional Accountability Act since 1995," the statement said. "We believe this is a strong step towards creating a new standard in Congress that will set a positive example in our nation, but there is still more work to be done."

Blunt said the bill would receive a vote as a standalone measure. He said he expects it would clear the Senate by the end of the week.

If the legislation sails to the president’s desk as expected, it will effectively close a loophole that has left taxpayers on the hook for settlements for lawmakers accused of harassment.

Under current law, taxpayer dollars are used to fund settlements between an accuser and a lawmaker. The House Administration Committee reported earlier this year said $200,000 had been used over the past 20 years for sexual harassment settlements.

Over the past year it was clear that Congress’ #MeToo reckoning was a bipartisan one.

Last year, Rep. John Conyers (D-MI) was forced to resign after it was revealed he settled a sexual harassment complaint for $27,000 in Treasury funds in 2015. In April, Rep. Patrick Meehan (R-PA) also stepped down after his $39,000 settlement became public. He pledged to repay taxpayers for the funds, as did then-Rep. Blake Farenthold (R-TX) when it was reported that the government covered $84,000 for a sexual harassment settlement. Farenthold later said he had no intention of paying back the Treasury.

Blunt, for his part, seemed to suggest that this was primarily a problem in the House, but said it was ultimately a positive step to have rules in place.

“If senators will continue to conduct themselves like they appear to have been, they may never have a settlement,” he said. “There have been, as you all know, House members involved in settlements. From the members’ point of view, it just creates one more potential liability that you really have less control over how it’s dealt with. But you certainly have control over whether you create the situation that creates a need to deal with it or not.”