An off-duty police officer who was getting a haircut Saturday soon shot and killed a suspect believed to have been behind a weekend shooting spree in Baltimore that left two people dead.

Police arriving at the barbershop "learned that an armed gunman walked into the business and shot and killed" a male barber before an off-duty police officer who was in the business at the time "shot the suspect, killing him," according to a statement posted on social media by the Baltimore Police Department. 

The Baltimore harbor and skyline.

The Baltimore harbor and skyline. (Getty Images)

BALTIMORE COUNTY COUNCILMAN: STATE'S ATTORNEY’S POLICIES CREATE ‘MESSAGE OF PERMISSIVENESS' AMID CRIME SPIKE

"Investigators believe that the suspect involved in this shooting was also responsible for the shooting that occurred today in the 5000 block of East Oliver Street and the Homicide that occurred in the 4600 block of Eastern Avenue," the statement said.

At a news conference, Baltimore Police Commissioner Michael Harrison said the unidentified off-duty officer "responded to the shooting immediately and with great bravery produced his firearm and fired at the perpetrator, striking the perpetrator."

Baltimore Police Commissioner Michael Harrison speaks during a community meeting on Feb. 11, 2019, at Forest Park High School. 

Baltimore Police Commissioner Michael Harrison speaks during a community meeting on Feb. 11, 2019, at Forest Park High School.  (Getty Images)

"Detectives are working to determine connectivity between this police-involved shooting, this homicide against the barber, in connection with two other shootings that happened slightly prior to this shooting," Harrison added.

CLICK HERE TO GET THE FOX NEWS APP

(Office of the State's Attorney Office for Baltimore City)

"We’re processing three different scenes in three parts of the city," Harrison continued, noting the active investigation. "While this perpetrator has expired from his injuries, we will still need answers to these questions."

One victim from the East Oliver Street shooting was in critical condition, authorities said.

Baltimore police did not immediately respond to a request for comment from Fox News.