What started as an unlawful police pursuit eventually turned into a proper arrest, a state court judge has ruled.

Two plainclothes police officers were patrolling the Jefferson Houses, a public housing project on East 112th St. in Manhattan, when they saw three men standing at the front door of one of the complexes’ apartment buildings on a summer evening in 2011.