CNN  — 

A gunman killed himself after shooting six people dead and injuring three others at a hospital in the eastern Czech city of Ostrava on Tuesday.

One of the victims was shot in an operating theater and later died. The head of the hospital, Jiří Havrlant, told reporters outside the hospital that all of the victims were patients, and that the suspect was shooting people at close range in their heads and chests.

The incident happened just after 7 a.m., according to interior minister Jan Hamáček, who added that police and emergency response units were in attendance.

Staff hide behind police vehicles near the hospital in the eastern Czech city.

Police said the “dangerous armed perpetrator” who was carrying a “short handgun” had fled the scene in a silver-gray Renault Laguna.

The police tracked him using a helicopter to Děhylov, a town roughly eight kilometers (four miles) from the hospital.

The 42-year-old suspect, who did not have a firearms permit, later shot himself in the head in the vehicle before officers could bring him into custody, police said.

“When the police arrived to the site of the car, the suspect was still alive. After around 30 minutes of resuscitation attempt, he died,” interior minister Hamáček said, adding that authorities are investigating the motive behind the shootings.

The gunman, who is from the eastern Opava region, has a criminal record for minor assault and property crime, police said.

Prime Minister Andrej Babiš said he “was being treated in the hospital, but it is still being investigated whether his treatment affected his mental state.” This is speculation at this point, the Prime Minister added.

Babiš called the incident a “huge tragedy” and “something we are not used to here” in an interview with state broadcaster Czech TV. “We need to find out the motive, these are events that, for us, are completely from a different world.”

Police said two of the dead were women and four of them were men, but declined to comment to CNN on the motive for the attack.

“The information from Ostrava university hospital [is] tragic,” the country’s minister of health, Adam Vojtech, tweeted Tuesday. “I am in touch with the hospital’s director and I am following the situation remotely. … thank you [to] the police and the hospital staff for their work on location.”

Three people were injured in the shooting, according to emergency services.

Two of the injured had to undergo surgery, Havrlant told journalists at a Tuesday press conference.

Police initially released a photo of a man who they mistakenly identified as the suspect. Officers arrested this misidentified person based on eyewitness’ statements, but realized he was not the right man shortly afterwards.

Hamáček later publicly apologized to the man.

Gun attacks are rare in the Czech Republic, which has some of the most liberal gun laws in the European Union. In 2017, it filed a lawsuit against a European Union directive for tighter controls on firearms. The case was dismissed by the European Court of Justice (ECJ) on December 3.

According to a 2017 report by the Small Arms Survey, there are 806,895 registered firearms in the country that has a population of around 10.5 million people.

Ostrava is an industrial and mining city in the Czech Republic’s rust belt, close to the border with Poland.

CNN’s Richard Greene contributed to this report.