WASHINGTON — After months of negotiations, lawmakers in the House and Senate have reached an agreement on Wednesday on legislation that would address how sexual harassment claims are dealt with in Congress, it was announced Wednesday.

The legislation would hold members of Congress personally liable for awards and settlements stemming from harassment and related retaliation they personally commit, including those who leave office. They can no longer pay out settlements with taxpayer funds and would be required to foot the bill within 90 days or their wages could be garnished.

The legislation is a major reform of the reporting and adjudication process for congressional employees. It comes as a reaction to a significant number of current and former congressional aides — mostly women — who revealed that they were harassed by a member of Congress or a high-ranking aide. In just this Congress, it led to the resignation of at half a dozen members after allegations surfaced.

The 11th-hour agreement before the congressional session is set to end in just one week is the product of a months-long negotiation between the House and Senate who passed their own bills earlier this year.

It is being praised by lawmakers on both sides of the aisle as much-needed reforms to a broken system that was stacked against victims of sexual harassment and rarely mandated accountability of the accused.

"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," Republican and Democratic House members said in a joint statement, including House Administration Chairman Rep. Gregg Harper, R-Miss., ranking member Robert Brady, D-Penn., and Rep. Jackie Speier, D-Calif.

Those House members worked with Senate Rules and Administration Chairman Sen. Roy Blunt, R-Mo., and Ranking Member Amy Klobuchar, D-Minn., to reach the agreement.

The bill, which would update a 1995 law — the Congressional Accountability Act — that governs harassment claims in Congress.

In addition to holding lawmakers personally accountable, it would also require the public reporting of a settlement, including naming the member of Congress who paid the settlement.

It also provides "an advocate" for victims who file complaints in the Senate and in the House the victim is provided legal representation, similar to one provided to the lawmaker who is being accused of harassment.

The agreement aims to cut down on the processes that deter a victim from moving forward with a claim, including a previously required 30-day "cooling off" period, the 30-day "counseling" period and the mandatory arbitration, which victims and their attorneys have said was more of a interrogation instead of an arbitration.

It also expands protections to interns and fellows, who are usually hired for a short term basis.

"While early reports indicate that the final agreement may not include some important provisions we have advocated for, we are nonetheless thrilled that major reform of the Congressional Accountability Act appears poised to finally become law," the victims' advocacy groups Congress Too and the Purple Campaign wrote in a statement. "These changes will provide the congressional workforce with the resources and protections they deserve, while making members of Congress more accountable to the constituents they serve.

Advocates feared that the House and Senate would not reach a deal before the end of the year in a critical year that the #MeToo movement has resulted in changes in many industries. If they didn't, the new Congress would have to start the process over.

"I think the final hurdle was getting beyond the election and getting everybody here for more than one day at a time, at the same time," Blunt told reporters about the deal. "Everybody will understand their personal liability and their personal responsibility and that will be a good thing."

Blunt told reporters Wednesday that he expects the Senate to vote on the bill by the end of the week and he spoke to Speaker Paul Ryan, R-Wis., about it earlier in the day and said the House is prepared to move on the bill when the lower chamber receives it.

Despite the progress, the House negotiators had hoped the legislation would go further. They are disappointed that the Senate would not agree to require personally liability for discrimination complaints and vowed to work on a new bill in next year.