Students accused of sexual assault will win new rights under sweeping rules being finalized by the Trump administration, giving universities clear but controversial guidance on handling these emotionally charged conflicts.

The final regulation will maintain contentious elements of a version proposed a year ago, including a provision requiring universities to allow cross-examination of those alleging sexual harassment or assault, according to people familiar with the matter who spoke on the condition of anonymity because they were not authorized to publicly discuss the rules.

In publishing last year’s proposed regulation, Education Secretary Betsy DeVos said the new rules would restore balance in a system that, in her view, had been skewed in favor of the accusers. She said her approach would provide clarity and fairness for victims and those accused of wrongdoing.

But the proposal came under intense fire from women’s rights groups and Democrats, who said it would allow assailants and schools to escape responsibility and make college campuses less safe for women. It received an astounding 124,196 public comments, including a crush of criticism from advocacy groups, survivors of sexual assault and campus leaders.

DeVos has been aiming to publish the final regulation before the year is out, although it’s possible that timeline will slip. Meetings are scheduled into January on the matter at the White House Office of Management and Budget, which reviews all regulations.

It’s unclear when the new rules will take effect. Advocates for sexual assault survivors said they’re already planning to challenge the regulation in court.

The regulations stem from a 1972 law known as Title IX that bars sex discrimination at schools receiving federal funding. Most of the attention is on higher education, but the rules also apply to elementary and secondary schools.

Sage Carson, manager of the Know Your IX project at Advocates for Youth, an advocacy group, said the flood of public comments may not have changed the Education Department’s mind but could lay the groundwork for a legal challenge.

“We hope it will give us grounds to really fight the rule through litigation,” she said.

Aiming to guard against that, the Education Department spent months reviewing the comments, diverting attorneys who normally work on other matters to help.

The rules could also be undone or modified through legislation. Sens. Lamar Alexander (R-Tenn.) and Patty Murray (D-Wash.) have been negotiating sexual assault rules for months as part of a broader effort to write a higher education bill. Alexander has offered concessions that would limit the use of cross-examination, but the changes have not been enough to bring Murray on board, Senate aides said.

The Education Department’s final regulation is expected to make at least one significant change in response to critics, people familiar with the matter said. Last year’s proposed version held universities responsible for investigating incidents only if they occur within the school’s programs or activities. That was interpreted by many as excluding activity in off-campus apartments or at parties at fraternities that are not recognized by the school. The wording of this provision was criticized by women’s groups and also, more quietly, by some Republicans.

The final version is expected to modify this language to make clear the rules cover a broader range of incidents. Some familiar with the regulation described it as an important change. Another person characterized it as more of a clarification.

Overall, the regulation describes what constitutes sexual harassment or assault as part of Title IX enforcement, what triggers a school’s legal obligation to respond to allegations and how a school must respond. Unlike less formal Obama-era guidance that is being replaced, the new regulation was subject to public comment and, once finalized, will carry the force of law.

The rules come after years of rising pressure on universities to better respond to sexual assault allegations and other misconduct. While the #MeToo movement brought increased public scrutiny to harassment and assault, the Trump administration’s proposal pushes the pendulum in the reverse direction by strengthening due process protections for those accused of offenses.

While the regulation is nearly final, it has yet to clear a final interagency review, meaning changes are still possible.

As it stands, the administration plans to maintain the most controversial, high-profile elements of the proposed version. That includes a definition of what constitutes sexual harassment or assault for the purpose of Title IX enforcement. The rule is expected to define harassment as “unwelcome conduct on the basis of sex that is so severe, pervasive and objectively offensive that it denies a person access to the school’s education program or activity.” In proposing that definition, the administration cited Supreme Court precedent.

That is much narrower than the definition used by Obama guidelines, which held harassment was “unwelcome conduct of a sexual nature.”

The final regulation will still allow universities to choose what standard of proof to use in judging harassment and assault cases, people familiar with the planning said. Schools will be allowed to choose between “preponderance of the evidence” or the higher bar of “clear and convincing evidence.”

And the final version will maintain the controversial requirement that universities allow cross-examination in a live hearing, with attorneys or agents of the parties asking the questions. The proposal also provides “rape shield protections,” such as a bar on questions about an accuser’s sexual history.

Supporters said cross-examination is the most effective way of ferreting out the truth of what happened in a situation when students offer different recollections of the same event. They point to court decisions that have mandated this approach for some public universities.

“Particularly in sexual misconduct cases, there often are no witnesses, and the decision turns on the credibility of the two parties. There really is no substitute for cross-examination in allowing the fact finder or the adjudicator to judge the credibility of the parties and witnesses,” said Samantha Harris, vice president for procedural advocacy at the Foundation for Individual Rights in Education.

But advocates for sexual assault victims said the provision could subject survivors to more trauma and discourage them from coming forward. And universities complained that the requirement would turn their campuses into courtrooms.

“The addition of direct confrontation is both unnecessary, potentially traumatic and without any meaningful addition in a truth-seeking function,” said Josh Richards, an attorney with Saul Ewing Arnstein & Lehr in Philadelphia, who represents dozens of universities.

He said a better system would allow a neutral investigator to ask the questions, not attorneys or representatives of the parties involved.