Judge Allison Burroughs said that although Harvard's admission program is "not perfect," it "passes constitutional muster." The judge wrote in her decision that creating "diversity at Harvard relies, in part, on race conscious admissions."
She added there is no evidence that any admission decision was "negatively affected by Asian-American identity."
The group Students for Fair Admissions (SFFA) brought legal action against the Ivy League school in 2014. SFFA says it will appeal the decision to a higher court.
Edward Blum, the group's president, said in a statement that the evidence SFFA presented during the three-week trial "revealed Harvard's systemic discrimination against Asian-American applicants."
Harvard did not immediately answer requests for comment.
The SFFA argued that Harvard held Asian Americans to a higher standard in admissions. The group said the Ivy League school gave preference to black and Hispanic students with lower grades.
The SFFA centered its argument on a subjective "personal rating" that Harvard gives to applicants. The group claimed Asian Americans often receive lower personal ratings than black and Hispanic applicants. This, SFFA said, led to the rejection of Asian American applicants who had stronger academic records.
In a 2013 internal report, Harvard found that if the school weighed applicants based only on academic records, 43 percent of the admitted class would be Asian-American. The actual percentage of Asian Americans was 19 percent.
Harvard denies using discriminatory practices in its admissions process. The school says it uses race as one of many things it considers in admissions decisions. It believes considering race can help create a mixed community "where students from all walks of life" can learn with and from each other.
Harvard called SFFA a political group with no real interest in helping Asian Americans. During the trial, no students testified that they had faced discrimination by Harvard.
Supreme Court rulings
The U.S. Supreme Court has heard several cases about affirmative action in recent years.
The court's most recent decision on the subject approved limited use of race in the admission process. That 2016 decision came from a lawsuit against the University of Texas that accused the school of discriminating against white students.
Harvard University leaders have said the school only considers race in a way that earlier Supreme Court cases have permitted. The university has also noted that its share of Asian Americans has grown in recent years.
Harvard reports that 25.3 percent of the latest first-year students are Asian-American. Blacks make up 14.3 percent. Hispanic are 12.2 percent and 1.8 percent are Native American.
The administration of U.S. President Donald Trump has fought affirmative action at several schools. In August 2018, the Justice Department issued a statement siding with Students for Fair Admissions and accusing Harvard of "outright racial balancing."
The department is also investigating the use of race at Yale University.
Students for Fair Admissions has also taken legal action against the University of North Carolina, Chapel Hill, over alleged discrimination against Asian-American applicants. That lawsuit, also filed in 2014, is still ongoing.
I'm Anne Ball.