A federal judge on Friday found that an exam for New York teaching candidates was racially discriminatory because it did not measure skills necessary to do the job, the latest step in a court battle over teacher qualifications that has spanned nearly 20 years.

The exam, the second incarnation of the Liberal Arts and Sciences Test, called the LAST-2, was administered from 2004 through 2012 and was designed to test an applicant’s knowledge of liberal arts and science.

But the test was found to fail minority teaching candidates at a higher rate than white candidates. According to Friday’s decision, written by Judge Kimba M. Wood of Federal District Court in Manhattan, the pass rate for African-American and Latino candidates was between 54 percent and 75 percent of the pass rate for white candidates. Once it was established that minority applicants were failing at a disproportionately high rate, the burden shifted to education officials to prove that the skills being tested were necessary to do the job; otherwise, the test would be ruled discriminatory.

In creating the test, the company, National Evaluation Systems, sent surveys to educators around New York State to determine if the test’s “content objectives” were relevant and important to teaching. The samples for both surveys were small, however, Judge Wood said.