BOSTON — Activists protesting what they call “police and state violence against black people” chained themselves to concrete-filled barrels and blocked a busy Boston-area highway at the height of the Thursday morning commute.

State police shut down northbound Interstate 93 south of the city, and I-93 south, in Medford, north of the city, about 7:30 a.m., inconveniencing thousands of drivers and causing miles-long backups.

The southbound lanes were reopened about 8 a.m. and the northbound lanes about 10 a.m. after police and firefighters used power saws to cut protesters out of the barrels to which they were attached while lying in the roadway.

The protesters north of the city chained themselves together using plastic pipes.

A total of 29 people were arrested at the two protest sites. They were expected to be arraigned later Thursday.

The protest was intended “to confront white complacency in the systemic oppression of black people in Boston,” the Boston contingent of Black Lives Matter said in a statement.

“Today, our nonviolent direct action is meant to expose the reality that Boston is a city where white commuters and students use the city and leave, while black and brown communities are targeted by police, exploited, and displaced,” protester Katie Seitz said in a statement.

Failure to indict white police officers blamed for the recent deaths of black men in Ferguson, Missouri, and New York City have led to protests nationwide.

The Boston protesters released a list of more than a dozen minorities they say have been killed by law enforcement in the city in the last 15 years.

Massachusetts State Police commander Col. Timothy Alben said a commuter called police about 7:20 a.m. to say that a white box truck had stopped in the highway south of Boston and the protesters had unloaded the barrels.

The first word of the protest north of the city came in minutes later.

Alben said traffic was so bad that state troopers responding to the scenes had trouble making their way through the jam.

Alben said while he understands and respects First Amendment rights, he called the protests “immature, irresponsible and reckless.”

Boston Mayor Martin Walsh said the protests put the public, emergency personnel, and the demonstrators themselves in danger.

“There are ways to demonstrate in a peaceful manner,” Walsh said.

An ambulance transporting a patient with serious injuries after a car crash in Easton, south of the city, to Boston City Hospital had to be diverted to a Brockton hospital, Alben said. The victim survived.

Gov. Charlie Baker said in a statement issued by a spokeswoman that “endangering drivers and impeding access to medical facilities” was not the best way to protest.

The protests seemed to frustrate and anger drivers.

“All they do when they do something like this is alienate people to their cause,” Philip Wood of Rockland told The Boston Globe. He owns a construction company and was waiting for a cement truck to arrive at a work site.