The court ruled 6-3 that the power of police to detain people is confined to the immediate vicinity of the premises for which they have obtained a search warrant.
The ruling came in the case of Chunon Bailey of Wyandanch, who, in 2005, left his apartment unaware that Suffolk County police were about to search the premises.
Bailey, who was 30 in August 2005, drove away from the apartment with another man who had a 10 p.m. curfew set as a condition of parole and apparently needed to get home.
The police detained Bailey and his passenger about three quarters of a mile from his apartment, handcuffed them and returned them to the premises, where they found drugs and a gun.
Bailey was convicted on cocaine possession and other charges and sentenced to 30 years in prison.
He unsuccessfully tried to persuade lower courts to throw out statements he made to the police after they detained him.
Writing for the high court's majority, Justice Anthony Kennedy said, "The categorical authority to detain incident to the execution of a search warrant must be limited to the immediate vicinity of the premises to be searched."
Breyer cited risks of "flight, of evidence destruction, and of human injury present in this and similar cases."
In 1981, the court expressed the same concerns cited by Breyer when it allowed detention of a person on the steps of a home being searched, in the case of Michigan v. Summers.
Hofstra University law professor Eric M. Freedman, a constitutional law expert, said Tuesday's decision was important because if police can "come up with an explanation to act any way they want when they like, then the Constitution has no meaning. The burden is on the police to justify the exceptional action of detaining someone."
Suffolk police Deputy Chief Kevin Fallon said through a spokeswoman: "The Suffolk County Police Department respects the rule of law and will abide by the court's decision."
Kennedy said prosecutors can still use another legal theory to argue police were justified in detaining Bailey and he sent the case back down to the Second U.S. Circuit Court of Appeals to revisit that aspect.
Attorneys who argued the case for Bailey and the U.S. solicitor general did not return phone calls for comment.