The Justice Department declared Thursday that a two-year investigation of Yale University’s admissions has found that the Ivy League school illegally discriminates against White and Asian American applicants in the highly competitive process of choosing an undergraduate class.

The department said it had concluded that the university gave too much weight to race in reviewing applications, in violation of federal civil rights law. “There is no such thing as a nice form of race discrimination,” Eric Dreiband, assistant attorney general for civil rights, said in a statement.

Yale said it “categorically denies this allegation.”

The department’s findings represented the Trump administration’s latest challenge to affirmative action in higher education, particularly the consideration of race in selective college admissions.

The issue, a flash point in the nation’s culture wars, has roiled parents, students, educators and activists for generations even though the Supreme Court as recently as 2016 has upheld the use of race-conscious admissions — within limits — to help colleges realize the educational benefits of campus diversity.

In July 2018, Trump officials rescinded guidance from the Obama administration on how schools could follow key court rulings to use race in the selection of a class. Separately, Trump’s Justice Department has filed briefs that back the plaintiff’s views in a lawsuit accusing Harvard University of bias against Asian Americans in admissions.

A federal judge last year handed Harvard a sweeping victory in that case, ruling that the university had not discriminated against Asian Americans. The plaintiff, Students for Fair Admissions, has appealed the ruling and hopes to push the issue up to the Supreme Court. An oral argument in that case is scheduled next month before the U.S. First Circuit Court of Appeals.

Responding to the Justice Department, Yale said Thursday it has no plans to change its admissions practices “on the basis of such a meritless, hasty accusation.”

The university added: “Given our commitment to complying with federal law, we are dismayed that the DOJ has made its determination before allowing Yale to provide all the information the Department has requested thus far. Had the Department fully received and fairly weighed this information, it would have concluded that Yale’s practices absolutely comply with decades of Supreme Court precedent.”

Not all colleges consider race in admissions. Some states, including California and Florida, bar public universities from looking at race or ethnicity. But race-conscious admissions is a widespread practice that the Supreme Court has long allowed, as long as schools do not use quotas and follow certain other restrictions. Opponents of those rulings are hoping to find a way to get the issue back in front of the Supreme Court.

The department’s probe of Yale was launched in 2018 after Asian American groups complained about the university’s admissions.

In a letter made public Thursday, Dreiband asserted that Yale has violated Title VI of the Civil Rights Act of 1964. “Yale’s discrimination is long-standing and ongoing,” Dreiband wrote in a letter to a law firm, Hogan Lovells, which is representing the university.

Dreiband claimed that Yale grants “substantial, and often determinative” preferences to certain “racially-favored applicants” and disfavors others. He also asserted that for “the great majority” of cases, Asian American and White applicants have “only one-tenth to one-fourth of the likelihood of admission as African American applicants with comparable academic credentials.”

Yale’s practices, Dreiband wrote, violate legal standards that require the use of race to be “narrowly tailored.” He accused Yale of discrimination that affects “hundreds of admission decisions each year,” and he wrote that Yale’s diversity goals “appear to be vague, elusory, and amorphous.” The letter indicated that investigators had examined data from 2000 to 2017.

Dreiband wrote that Yale should cease using race in the next admissions cycle in 2020-2021, or else it should give the Justice Department a plan showing how race would be a “narrowly tailored” factor. He warned that the department was prepared to file a lawsuit to force compliance.

Yale fired back with a statement defending a process that is common in many colleges and universities — holistic admissions.

“At Yale, we look at the whole person when selecting whom to admit among the many thousands of highly qualified applicants,” the university said. “We take into consideration a multitude of factors, including their academic achievement, interests, demonstrated leadership, background, success in taking maximum advantage of their secondary school and community resources, and the likelihood that they will contribute to the Yale community and the world.”

The university said it was “proud” of its admission practices and that it has “cooperated fully” with the investigation. “We have produced a substantial amount of information and data, and we are continuing to do so,” the university said.

Edward Blum, a critic of affirmative action who is the president of Students for Fair Admissions, applauded the department.

“The Justice Department’s findings of decades-old, purposeful racial discrimination in admissions is not surprising since all of the Ivy League and other competitive universities admit to using racial classifications and preferences in their admissions policies,” Blum said. “This investigation reinforces the need for all universities to end race-based admissions policies.”

Last spring, Yale offered admission to 2,304 students for the incoming freshman class out of more than 35,000 who had applied.

Federal data show that 20 percent of Yale’s undergraduates are of Asian descent, 14 percent are Hispanic or Latino, 8 percent are Black and 7 percent are multiracial. Forty percent are White and another 10 percent are from foreign countries.

“Yale’s admissions practices help us realize our mission to improve the world today and for future generations,” university President Peter Salovey wrote in a letter to the community. “At this unique moment in our history, when so much attention properly is being paid to issues of race, Yale will not waver in its commitment to educating a student body whose diversity is a mark of its excellence.”