BOSTON (Reuters) - Massachusetts’ top court ruled on Wednesday that police can carry out traffic stops for motor vehicle violations as a pretext to probe for other crimes, but the justices expressed concerns about how racial bias could influence such stops.

The Massachusetts Supreme Judicial Court rejected arguments by a lawyer for a man convicted of cocaine possession that “pretextual” traffic stops violate defendants’ rights under the state’s constitution to be protected from unreasonable seizures.

Justice Elspeth Cypher said “the fact that a traffic law has been violated is, generally speaking, a legally sufficient basis to justify stopping a vehicle, irrespective of any additional suspicions held by the officer(s) conducting the stop.”

But Cypher, writing for a 7-0 court, said Rogelio Buckley’s attorney in arguing for banning pretextual traffic stops had raised “considerable, legitimate concerns” about the role racial profiling plays in police stopping vehicles.

Justice Kimberly Budd, in a concurring opinion, said while Buckley, who is black, had not himself argued he was stopped for “driving while black,” concerns about bias were “well founded.”

“Further, recent tragic events have shown that the fear people of color have of being stopped by police is justified: African-Americans have been killed during routine traffic stops,” Budd wrote.

The court left open the possibility of considering the issue in the future. Budd encouraged Massachusetts’ legislature to require data collection on traffic stops.

The law firm that represented Buckley, Wood & Nathanson LLP, expressed disappointment, saying the decision gave “short shrift to the real world difficulties faced by people who are subjected to pretextual stops.”

Rahsaan Hall, director of the American Civil Liberties Union of Massachusetts’ Racial Justice Program, called the ruling “a setback for racial justice, for the police accountability movement and for the physical safety of people of color in Massachusetts.”

Plymouth County District Attorney Timothy Cruz said he was “committed to promoting fair procedures to guide the police in their interactions with the public.”

According to the ruling, Buckley was a passenger in a car that parked in 2013 near a Whitman, Massachusetts, apartment where police suspected drug activity was occurring.

After police witnessed two people from the car go into the building and then drive off without its headlights on, police stopped the vehicle for speeding.

Police found a firearm and cocaine in the car. Buckley was convicted in 2015 of a cocaine possession charge. He originally also faced firearm charges.