A man firing from a moving car killed six people and wounded at least 15 in Krakow's Main Market Square on Saturday afternoon, Polish police said.

The shooting started at about 3 p.m. near Slawkowska Street, just off the square, ABC News reported, citing regional police. Four of the dead were women and two were men, according to CNN.

Prime Minister Donald Tusk said three of the suspect's relatives were later found dead in his home. Officials described the gunman as holding ultranationalist views, and the defense minister called it a terror attack, NBC News reported.

He did not stay in one place. Police spokesperson Katarzyna Cislo said the man drove erratically around the square, which is why people were hit at several different spots, CNBC reported. She told ABC News he wore military-style camouflage and was reportedly carrying an AR-15-style rifle.

Officers shot him, and he was taken to a hospital. Authorities had not released his condition as of Sunday morning.

Two police officers were seriously wounded, according to NBC News. Tusk named both of them.

Witness videos showed people running into side streets for cover while first responders worked on victims in the square. A medical helicopter landed among the cafes. Krakow's transit company said a tram driver reported his vehicle was shot at from a passing car, and an animal welfare group said the gunman also shot two horses, CNBC reported.

Police are still investigating his background and what led to the attack.