ST. PAUL — Police officers in riot gear clashed with protesters who blocked a major highway here for hours on Saturday night, marking a tense turn for the demonstrations that have continued almost nonstop since a black man, Philando Castile, was fatally shot by a suburban police officer during a traffic stop on Wednesday.

The protesters marched from the Minnesota governor’s mansion onto Interstate 94, chanting refrains such as “We’re peaceful, y’all violent” as the police urged them to leave. Officers struggled for more than four hours to disperse the crowd, at times deploying smoke and marking rounds in a standoff that stretched into early Sunday before snowplows cleared debris and the highway was reopened to traffic.