The unanimous decision comes in a case from Portsmouth, Va., where city detectives seized crack cocaine from a motorist after arresting him for a traffic ticket offense.
David Lee Moore was pulled over for driving on a suspended license. The violation is a minor crime in Virginia and calls for police to issue a court summons and let the driver go.
Instead, city detectives arrested Moore and prosecutors say that drugs taken from him in a subsequent search can be used against him as evidence.
"We reaffirm against a novel challenge what we have signaled for half a century," Justice Antonin Scalia wrote.
Scalia said that when officers have probable cause to believe a person has committed a crime in their presence, the Fourth Amendment permits them to make an arrest and to search the suspect in order to safeguard evidence and ensure their own safety.
Moore was convicted on a drug charge and sentenced to 3½ years in prison.
The Virginia Supreme Court ruled that police should have released Moore and could not lawfully conduct a search.
State law, said the Virginia Supreme Court, restricted officers to issuing a ticket in exchange for a promise to appear later in court. Virginia courts dismissed the indictment against Moore.
Moore argued that the Fourth Amendment permits a search only following a lawful state arrest.
In a concurring opinion, Justice Ruth Bader Ginsburg said she finds more support for Moore's position in previous court cases than the rest of the court does. But she said she agrees that the arrest and search of Moore was constitutional, even though it violated Virginia law.
The Bush administration and attorneys general from 18 states lined up in support of Virginia prosecutors.
The federal government said Moore's case had the potential to greatly increase the class of unconstitutional arrests, resulting in evidence seized during searches being excluded with increasing frequency.
Looking to state laws to provide the basis for searches would introduce uncertainty into the legal system, the 18 states said in court papers.
Court Considers Case That Could Help Workers Claim Benefits
The Supreme Court struggled Wednesday with how much weight to give an insurance company's potential conflict of interest when it denies an employee's health or disability benefits claim.
The lawyer representing the woman who sued MetLife Inc. over a disability claim argued that insurance companies have a financial incentive to deny claims. That conflict of interest should weigh heavily in employees' favor when they challenge benefit claims in court, Joshua Rosenkranz said in court papers.
The dispute is being closely watched by insurance companies and business groups. Depending on how the justices rule, the dispute could make it easier for employees to win benefit payments in court.
Disability benefits are a big business. Disability insurance plans cover 28 million Americans, and insurers paid more than $7.2 billion in long-term disability claims to more than 500,000 people in 2006, according to court papers filed by the U.S. Chamber of Commerce, America's Health Insurance Plans and the American Benefits Council.