The Virginia Military Institute has agreed to allow pregnant or parenting cadets to remain enrolled, reversing a policy that had required them to leave the public college, federal officials announced Friday.

The shift came in response to a broader inquiry into allegations of sex discrimination at VMI. Federal investigators also faulted VMI’s handling of several sexual harassment and assault complaints, finding that the college in Lexington had allowed some cadets to be subject to “a sexually hostile environment” in violation of federal law.

Those conclusions stung for a school that underwent a profound cultural shift after it admitted women for the first time in 1997 in response to a U.S. Supreme Court ruling. The findings also reflected an Obama administration drive to use enforcement of civil rights law to combat sexual assault on the nation’s college campuses.

Tufts University announced Friday that it was recommitting itself to an accord with the federal government resolving an investigation into sex assault issues on its campus. That signaled the end of a dispute between the Massachusetts school and the Obama administration over federal enforcement.

The agreement between VMI and the U.S. Education Department centers on changes in the college’s policies to strengthen safeguards against sex discrimination and resolves an investigation that lasted six years.

“I am thrilled that VMI has agreed to take necessary corrective steps going forward” Catherine E. Lhamon, assistant education secretary for civil rights, said in a statement. “I am also delighted that VMI now allows cadets who become pregnant and all cadets who become parents to continue their education at VMI.”

VMI said it signed the eight-page resolution agreement with the department’s Office for Civil Rights (OCR) despite reservations. The college said it had initiated many of the anti-discrimination measures listed in the agreement.

“We signed this agreement not because we feel the findings are representative of the VMI environment; but rather, it is in the best interest of the institute to cooperate with OCR and put an end to this six-year investigation,” VMI spokesman Stewart D.
MacInnis said in a statement.

“In light of all of the strides made by VMI in the six years the OCR investigation has been pending,” MacInnis added, “VMI is profoundly disappointed with OCR’s findings.”

The findings were disclosed in a 25-page letter from OCR to Gen. J.H. Binford Peay III, a retired Army officer who is a VMI graduate and has been superintendent of the college since 2003. Peay was unavailable Friday for comment.

The federal action came as the Obama administration has pressed colleges across the country to take steps to prevent sexual assaults and overhaul how they respond to assault reports.

Founded in 1839, VMI has about 1,600 cadets, 90 percent of them male. It was the last public military college in the country to admit women.

In 2002, VMI adopted a policy that prohibited “cadet parenthood,” effectively requiring those who were pregnant or parents to leave the school. After federal officials challenged the legality of the policy, VMI changed it to allow pregnant and parenting cadets to stay under certain conditions. For instance, pregnant cadets must be able to perform cadet duties or be offered temporary medical leave. Cadets who are fathers or mothers must arrange for their children’s care and support.

The policy changes took effect in April.

MacInnis said that to his knowledge there had been no ­cases in which VMI had kicked out a cadet who became pregnant. One, he said, voluntarily resigned after disclosing that she was pregnant. He said it was also possible that other cadets had quietly left for that reason without informing VMI.

The 25-page letter detailed VMI’s handling of six complaints of alleged sexual assault or harassment from the 2009-10 through 2012-13 academic years. Federal officials found several shortcomings in VMI’s responses.

For example, when a female cadet reported that a VMI administrator sexually assaulted her, federal officials said, the college’s senior leaders initially failed to notify their Title IX coordinator even though VMI policy required them to do so. “VMI did not take appropriate steps to investigate or otherwise determine what occurred,” federal officials said. However, VMI ultimately terminated the administrator for “inappropriate and unprofessional conduct.”

MacInnis said, “We are committed to moving forward to do all in our power to ensure the safety and well-being of our cadets and employees.”