NEW YORK (CNN) -- A federal judge ruled Wednesday that the New York City Fire Department used recruitment exams that discriminated against African-American and Hispanic applicants.

Judge finds written firefighter tests had "discriminatory effects" on minority candidates.

U.S. District Judge Nicholas Garaufis found that the written tests had "discriminatory effects and little relationship to the job of a firefighter." Garaufis also concluded that the "examinations unfairly excluded hundreds of qualified people of color from the opportunity to serve as New York City firefighters," thus, he said, constituting employment discrimination.

The ruling came in a lawsuit filed by the U.S. Department of Justice against the city of New York, with the suit challenging whether the city's written fire-department exams from 1999 to 2007 disadvantaged would-be African-American and Hispanic firefighters.

Of the firefighters in the New York City Fire Department in 2007, 3.4 percent were African-American and 6.7 percent Hispanic, according to court documents.

The Vulcan Society, an organization that represents African-American firefighters, also was listed as a plaintiff in the lawsuit. After the society complained about the entry-level firefighter tests and also filed a complaint with the city's Equal Employment Opportunity Commission, the fire department revised the 2007 written test.

Don't Miss High court backs New Haven firefighters in reverse discrimination suit

After the ruling was announced, Georgia Pestana, chief of the labor and employment division at the city's law department, released a statement saying New York City embarked on a $2 million minority recruitment campaign that tripled the number of African-American and Hispanic applicants. Because of the campaign and the revised test, Pestana said, over a third of the most recent graduating class of probationary firefighters are minorities.

"We are disappointed and respectfully disagree with the court's decision, but emphasize that the lawsuit and the decision concern tests given in 1999 and 2002," Pestana said.

But the president of New York's Vulcan Society said that the city has only "begun to scratch the surface" of diversifying the department's ranks.

"If you have abysmal numbers and you increase slightly, don't applaud yourself like you've done a great job," he said.

The most recent 2007 exams were first used for new 2008 hires, said Connie Pankratz, deputy communications director at the New York City Law Department.

The case is still ongoing, and Garaufis must now decide on a remedy that addresses the racial disparity that resulted from the earlier exams.

The Department of Justice had no immediate comment on the ruling.

In his Wednesday ruling, Garaufis ruled the city failed to show that the exams "actually tested the abilities it intended to test."

The Supreme Court in June ruled in favor of firefighters in the discrimination case involving a promotional exam in New Haven, Connecticut. A group of 20 mostly white firefighters accused the city of New Haven of unfairly throwing out their test scores because not enough minorities qualified.

Garaufis said the decision in that case did not determine the outcome of the New York case.

All About New York City Fire Department