Senate Majority Leader Mitch McConnell (R-Ky.), left, Senate Minority Leader Charles E. Schumer (D-N.Y.) and House Minority Leader Nancy Pelosi (D-Calif.) listen as President Trump speaks during a Congressional Gold Medal ceremony honoring former senator Bob Dole on Capitol Hill on Jan. 17, 2018, in Washington. (Evan Vucci/AP)

Congress backed legislation on Thursday that would make lawmakers financially liable for sexual harassment settlements and eliminate unnecessary barriers to reporting workplace misconduct on Capitol Hill.

The swift passage of a compromise bill by the House and Senate revealed overwhelming bipartisan support for changing policies on Capitol Hill in response to the #MeToo movement after nearly seven months of negotiations. Last fall, Congress’s system for addressing lawmaker misconduct, including employee settlements funded by taxpayers, was criticized as unfairly protective of members of Congress over their aides.

The bill — passed less than 24 hours after a deal was announced — now goes to the White House for President Trump’s signature.

Advocates welcomed the measure, which mandates an annual report of all settlements and awards and eliminates the confidentiality agreements required for accusers at the beginning of the existing process.

“That sound you’re hearing is the swamp draining when it comes to harassment in Washington, D.C.,” said Rep. Bradley Byrne (R-Ala.), a leader of the reform effort. “It was important for the Congress to make this statement.”

Still, members of the House vowed to go further in the next Congress.

“When House Democrats take the gavel in January, we will move to build on the progress made by this legislation,” Speaker-designate Nancy Pelosi (D-Calif) said in a statement. “We must end the culture of complicity and silence around workplace harassment by ensuring that taxpayer money will never again be used for settlements, and that members are held personally liable for discrimination in their offices.”

The measure approved on Thursday only requires lawmakers to pay for settlements involving harassment and retaliation, not discrimination. Cases in which a woman is fired for being pregnant, for example, would not trigger the liability.

Republicans and Democrats in the lower chamber said they plan to introduce legislation next year to change this on the House side.

“Because we had to go through the compromise in the Senate, the one section that got taken out was the member accountability for violating Title VII,” said Rep. Jackie Speier (D-Calif.), another leader of the reform effort. “We’re going to introduce it as a bill so it would have to pass the Senate as well. ... They’ve given us a commitment that they will have a vote on it.”

Other disagreements between the House and Senate were apparent in the final bill, including on the kind of free counsel available to staffers who file complaints.

In the House, accusers will have access to full legal representation. In the Senate, accusers will have access to a confidential advocate who must be an attorney but is barred from formally representing them.

The amount of information released about settlements and awards could also vary by chamber. The House plans to identify the congressional offices involved and say whether the member was liable, aides said.

The Senate approved the compromise bill by unanimous consent before noon.

“It’s a bicameral and bipartisan agreement,” said Senate Majority Leader Mitch McConnell (R-Ky.). “It strengthens protections for victims. It ensures that members of Congress will be held responsible for their own misconduct — not taxpayers.”

The House followed at midday with its own unanimous consent vote.

Bringing a claim of misconduct will now involve a preliminary review, optional mediation and a formal hearing unless the accuser wishes to file a lawsuit, according to a copy of the final draft text obtained by The Post. Under the current system, accusers are subject to mandatory counseling, mediation and “cooling off” periods.

The new bill states that accusers must bring a claim within 180 days of the alleged incident of harassment or retaliation. Lawmakers are financially liable for the full sum of any settlement and up to $300,000 of any award ordered by a court if their personal behavior is implicated.

Payments to the accuser will still come from the Treasury Department and lawmakers’ contributions will be deducted from their paychecks.

The result of claims filed against lawmakers or senior staff will be referred to the respective chamber’s ethics committee.

The bill gives accusers the option of requesting paid leave or the ability to work remotely during the proceedings, depending on the circumstances.

Awards and settlements would be publicly reported without identifying the accuser. Prior awards and settlements under the Congressional Accountability Act will also be reported within 30 days of the law’s enactment.

The bill implements a regular climate survey of House and Senate offices that will include questions about sexual harassment and other workplace issues. It also extends protections to unpaid staff, including interns.

All provisions will take effect within 180 days of the bill’s enactment, it stated. The measure is not retroactive, however, and will apply only to people who file claims after it becomes law.