WASHINGTON  The Supreme Court has limited the power of police to detain people who are not at home when their residence is to be searched.

By a 6-3 vote Tuesday, the justices sided with a Long Island, N.Y., man who was picked up about three-quarters of a mile away from his apartment as police searched it for a gun.

Justice Anthony Kennedy said in his opinion for the court’s majority that the authority of police to detain people found at home during a search authorized by a warrant is limited to the immediate vicinity of the premises. He said that concern for officer safety diminishes the farther away from the home the detention occurs.

In dissent, Justice Stephen Breyer said he would have upheld lower court rulings in favor of the police “in light of the risks of flight, of evidence destruction, and of human injury present in this and similar cases.” Justices Samuel Alito and Clarence Thomas joined Breyer’s dissent.

The Fourth Amendment usually requires police to strongly suspect an individual has committed a crime before he can be detained. But the court in 1981 ruled in Michigan v. Summers that police could detain people without suspicion during a search to keep them from doing harm to officers, keep them from fleeing and allowing them to, for example, open a door instead of having the police bash it in.