Video (05:02) : Police and protesters were in a long standoff after a march shut down I-94 for several hours Saturday night and into Sunday morning.

Marchers protesting the Wednesday night shooting death of Philando Castile by police caused an hourslong shutdown of part of Interstate 94 west of downtown St. Paul, starting just before nightfall Saturday and ending after 1 a.m. Sunday, when the freeway reopened to traffic.Dozens of people were arrested.

Dozens of police officers decked out in riot gear used smoke bombs, and eventually tear gas and pepper spray, to disperse the crowd that gathered mostly at the Lexington Avenue exits and spread eastward to Dale Street.

Around 11:15 p.m., police began arresting people one by one, escorting them to a law enforcement bus, but scores of protesters stayed at the scene. As police advanced, marchers retreated up the adjacent hill and left the freeway. A long line of officers stood in a blockade to keep protesters off the roadway.

“Make some noise, loud enough for the people on the paddy wagon to hear us,” demonstrators yelled from the hillside.

As the protest began to disperse shortly after midnight Sunday, several hundred people began to march “in triumph” back to the governor’s residence, where demonstrators have kept a constant presence since shortly after Castile’s death.

At least five officers were injured after being hit by rocks, glass bottles or fireworks thrown by protesters, St. Paul police reported, and demonstrators on a pedestrian overpass threw objects including bricks and rebar at officers and dumped liquid on them. Police ordered people off the overpass and warned that they risked arrest.

Gallery: Shootings spark day of protests across Twin Cities Gallery: Shootings spark day of protests across Twin Cities

About 1 a.m, police said plows were cleaning debris from the interstate as first steps to reopening it to freeway traffic. I-94 had remained closed from Hwy. 280 to the downtown St. Paul exits for more than five hours after the disruption began. As early as 7:30 p.m., officers had started diverting traffic off I-94 at Lexington Avenue; as all cars were forced to file off the freeway, logjams began to form and police closed the highway in both directions.

In the heat of the protest, as many as 300 people were spread across both the eastbound and westbound lanes of the major traffic artery connecting Minneapolis and St. Paul. Many sat down on the asphalt roadway while others stood, the air filled with yelling and chanting. Around 10:45 p.m., the crowd broke out in a chorus of Prince’s “Purple Rain,” a familiar Twin Cities anthem. Protesters had moved a small pickup onto the highway and were broadcasting with sound ­equipment.

Some onlookers climbed over the freeway fence to join the blockade, with the crowd swelling as people blocked the freeway lanes in both directions.

Around 10 p.m., officers had issued the 16th order to vacate the interstate, and protesters were not budging.

Officers set off smoke bombs to disperse the protesters. About 100 feet away from the crowd, police cars with lights flashing were lined up in force, with officers addressing the marchers over loudspeakers and ordering them to “leave now” or face arrests.

At one point, two dozen officers in riot gear pressed on the crowd, a paddy wagon following behind.

No arrests were reported by about 10 p.m., said St. Paul police spokesman Steve Linders, but by 11:45 police were taking people into custody.

Marchers, some of whom had earlier demonstrated at the governor’s residence on Summit Avenue in St. Paul, were beating drums and chanting slogans, including “Black lives matter.” One protester’s sign read: “We are not target practice.” Another said “Love, peace and change.”

About 9 p.m. on Twitter, Black Lives Matter Minneapolis posted: “We shut down 94 for Philando. We are gonna need bail money. Please make a gift now.”

The protest quickly grew into the day’s biggest and most disruptive demonstration in the Twin Cities, following a peaceful daylong gathering at the governor’s residence and a separate rally at Loring Park that spilled into the streets of downtown Minneapolis, where protesters briefly stopped traffic at 9th and Hennepin, blocked an entrance at the Basilica Block Party and marched past Target Center.

Castile, a 32-year-old school cafeteria worker from St. Paul, was fatally shot by a police officer Wednesday night during a traffic stop in Falcon Heights. The aftermath, as he lay dying in the driver’s seat, was live-streamed on Facebook by his girlfriend sitting alongside him while her 4-year-old sat in the back seat.

Castile’s death, coming one day after the fatal shooting of another black man, Alton Sterling, in Louisiana and one day before a sniper killed five police officers in Dallas, has put Minnesota in the center of national anguish over race and law enforcement.

Staff writers Kim Palmer and Jennifer Brooks contributed to this report.

Twitter: @randyfurst