The Rev. Al Sharpton, center, walks with demonstrators June 17, 2012, during a silent march to end the "stop-and-frisk" program in New York. (Seth Wenig/AP)

A federal judge in New York has ruled New York City's controversial "stop and frisk" law unconstitutional, saying it is a "form of racial profiling."

The judge noted that the policy, which allows officers to briefly detain a person if they have reasonable suspicion that the person is in the process of committing or is about to commit a crime, goes too far. It also permits pat downs if the officer feels he or she is in danger.