Housing Court Judge José Rodriguez, who for 27 years decided what was legal and just for the thousands of landlords and tenants who came before him, died Saturday evening, court officials said.

He was one of the most senior Housing Court judges in New York City, working many years in the Bronx but eventually serving in every single borough. He had been assigned to Queens for the past two years.