More than a year after the ­#MeToo era began, the House and the Senate reached a deal Wednesday to change their policies on sexual harassment and make lawmakers liable for their own misconduct in the workplace.

The agreement was brokered after nearly seven months of negotiations between the two chambers and with just days left in the 2018 legislative calendar. Members involved in the talks predicted that the bill would be adopted quickly in both chambers and that the new rules would take effect before January, when the new Congress convenes.

While exact legislative language was not released, the Senate Rules Committee confirmed that lawmakers will be required to reimburse the Treasury Department for settlements and awards resulting from harassment or retaliation they commit. Under the current system, settlements are paid for by taxpayers.

“Everybody will understand their personal liability and their personal responsibility, and that will be a good thing,” Rules Committee Chairman Roy Blunt (R-Mo.) told reporters Wednesday.

Leaders and other lawmakers in the House promised further action in the next Congress.

“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,” House Speaker Paul D. Ryan (R-Wis.), House Minority Leader Nancy Pelosi (D-Calif.) and other key lawmakers said in a joint statement.

The deal represents the first major change to Capitol Hill’s employment policies in response to the #MeToo movement, apart from mandatory anti-harassment training for lawmakers and staff.

More than half a dozen members of Congress were forced to resign within the past year amid allegations of sexual harassment or misconduct. Some had been involved in secret settlements that were eventually revealed in the media.

Advocates said the changes were long overdue. The system for reporting harassment and discrimination in congressional offices received widespread criticism last fall amid claims that it favored lawmakers over staff. In addition to taxpayer-funded settlements, the current process involves mandatory counseling, mediation and “cooling off” periods for accusers.

The House and the Senate passed separate overhaul bills earlier this year and began negotiations over points of disagreement, including when lawmakers would be personally responsible for settlements and what kind of free advice would be available to people who bring claims.

Under the agreement, the mandatory counseling, mediation and “cooling off” periods for accusers would be eliminated. Any settlement or award would be automatically referred to the respective chamber’s ethics committee. Members’ liability would be capped for awards but not settlements. And that liability would continue even if a member leaves office.

The deal involves greater transparency. Awards and settlements would be publicly reported, including whether a member of Congress was held personally liable, and a staff survey would be conducted each Congress about workplace culture.

The compromise would extend protections to unpaid staff, including interns and fellows and provide opportunities for accusers to work remotely or request paid leave.

There were a handful of inter-chamber splits, including on the kind of free counsel available to accusers. Senate staffers will have access to a confidential advocate who must be an attorney but cannot provide legal representation. House staffers will have access to full legal representation.

In a joint statement, House leaders and lawmakers described their goals for the next Congress.

“House Republicans and Democrats remain committed to working in a bipartisan manner to address outstanding issues in the 116th Congress, including passing legislation which holds members personally liable for discrimination, reauthorizing the Employee Advocate, and strengthening our workplace rights and responsibilities education program,” said Ryan, Pelosi, Rep. Jackie Speier (D-Calif.), the leaders of the House Administration Committee and Rep. Bradley Byrne (R-Ala.).

The absence of a deal before the midterm elections had raised fears that reforms would be delayed until after Democrats took control of the House in January. But lawmakers at the center of the talks had predicted an agreement would take shape this month.

A summary of the deal was released by the Senate Rules Committee.

Paul Kane and Seung Min Kim contributed to this report.