A Brooklyn federal judge who ruled that FDNY entrance tests discriminate against minorities yesterday ordered Mayor Bloomberg to give a three-hour deposition in the controversial case.

Judge Nicholas Garaufis said he based his ruling on new evidence — the mayor’s July 16 testimony at a Senate Judiciary Committee hearing on confirming Sonya Sotomayor as a Supreme Court justice.

Bloomberg said the city now actively recruits minority FDNY candidates and had revised the tests.

Garaufis said that testimony wasn’t available to Magistrate Judge Roanne Mann when she denied a request from the Vulcan Society, which claims the tests are biased against minorities, to have the mayor give a deposition.

The society, which is suing the FDNY in Brooklyn federal court, wasn’t happy with written responses provided by the mayor. It appealed Mann’s ruling to the next highest level, a federal judge.

On July 22, Garaufis ruled that tests in 1999 and 2002 discriminated against black and Hispanic applicants because they bore “little relationship to the job of a firefighter.”

He said the “discriminatory effects” of the SAT-style tests helped limit the number of minority firefighters to just 303 blacks and 605 Hispanics.

Bloomberg said, “I have to talk to our lawyers, but normally I give depositions when asked.”