LOS ANGELES — Police officers cannot detain someone on the street just because that person tries to avoid contact with them, the California Supreme Court ruled Thursday.

The decision has immediate implications for police officers working all across the state, restricting the grounds under which they can stop and hold people for questioning. It could also affect other litigation in which arrests are being challenged, particularly when people of color allege they were detained simply for trying to avoid police.