A longtime employee of the city of Baltimore was killed Tuesday when he was struck by a speeding car while on a sidewalk near City Hall, authorities said.

The victim, Matthew Hersl, 45, of Baltimore, worked in the finance department and was a “happy-go-lucky guy” who was apparently on his way home after a 6 a.m.-to-2 p.m. shift, said Bernard C. Young (D), the president of the Baltimore City Council.

A few minutes earlier, state police said, a trooper had been headed south on the Jones Falls Expressway when a vehicle approached his at “high speed.”

After the trooper activated emergency lights, the vehicle slowed and stayed behind the trooper before suddenly leaving the expressway.

The trooper did not pursue but tried “to observe the vehicle” to alert Baltimore authorities, state police said. The car went through a red light in the heart of downtown, then went out of control.

Young said he heard a “bang and boom.” The crash apparently occurred near Lexington Street about 500 feet from City Hall, Young said. State Police Sgt. Marc E. Black said Hersl was on a sidewalk and the car was overturned.

Police said the driver tried to flee but was detained by the trooper.