A crazed knife-wielding man stabbed five people in seemingly random attacks in suburban Baltimore before being shot dead by cops, according to authorities.

Jamaal Ramone Taylor, 31, was gunned down Saturday afternoon after refusing orders to drop the hunting knife he used to stab apparent strangers in at least three separate locations, according to cops.

All five victims suffered non-life-threatening wounds and were transported to local hospitals for treatment.

The first 911 call about the mayhem reported a man threatening people in a liquor store at the Hunt Valley Towne Centre, Baltimore County Police said in a statement.

Cops then found three victims with stab wounds at the store — with two more knifed outside neighboring businesses.

The suspect fled on foot but was soon confronted by police nearby, still holding the knife that a spokeswoman described as a 3-inch hunting blade.

“Arriving officers encountered the suspect brandishing a knife,” the police statement said. “Officers gave repeated commands to the suspect to drop the knife, but he refused to comply with police directives, and they were forced to discharge their weapons.”

He was pronounced dead at the scene, cops said.

An off-duty EMS captain who was shopping at the time helped at least one of the injured, authorities said.

The officers involved have been placed on routine administrative leave pending an internal investigation, with officials looking for surveillance and bodycam footage.