CHARLOTTE — Police on Tuesday shot and killed a black man they said was armed outside an apartment complex, setting off violent protests that continued late into the night and left about two dozen people injured.

A large crowd of demonstrators gathered near the University of North Carolina at Charlotte on Tuesday night to protest the killing of Keith Lamont Scott, who was fatally shot by a Charlotte-Mecklenburg Police Department officer earlier in the day. Scott’s family insisted he was not armed when he was killed near the university campus.

The demonstrations began peacefully, with some people chanting “black lives matter” and “hands up, don’t shoot.” News reports and posts on social media later showed police in riot gear firing tear gas and rubber bullets at the demonstrators and some people smashing out the windows of police cars.

Early Wednesday morning, protesters shut down traffic on Interstate 85. Some protesters opened up the backs of tractor trailers, took out boxes and set them on fire in the middle of the highway, WSOC reported. The station spoke to one truck driver who said people stole cargo from her trailer. Police reportedly used flash grenades to break up the crowd and had cleared the highway by early morning.