The attacker reportedly targeted people at random while driving into the city's Main Market Square, a major tourist attraction in the historic city centre.

Several police officers were also among those wounded.

Police identified the gunman as a Polish national, according to local media outlet Onet.

He was reportedly not carrying any identification documents when officers established his identity through an investigation.

"The man had no identification documents with him. The police were able to establish his identity through operational work,” Onet quoted a police officer as saying.

Gunman shot in exchange of fire

The suspect was shot and injured during an exchange of fire with police officers a short distance from the location of the initial attack.

Katarzyna Cisło, a spokesperson for Krakow Police, told local broadcaster TVN24 that the attacker was wearing military-style fatigues and carrying a military-type long gun.

Cisło said the man had acted alone and that the public was no longer in danger.

The shooting triggered a major police response in the city centre.

Mass shootings are rare in Poland.

Polish leaders express solidarity

Polish Prime Minister Donald Tusk said in a post on X that police were investigating the attack.

President Karol Nawrocki expressed solidarity with those killed and injured, as well as their families, following the shooting.

Tom Rose, the United States ambassador to Poland, condemned the incident, describing it as a "savage and murderous attack".

“We are just learning details of the horrific mass shooting in Krakow, a savage and murderous attack that’s shattered the peace of Poland. America stands with Poland at this dark hour as Poland stands with her beloved citizens of Krakow,” Rose wrote.

Poland's tourist hub rocked

The shooting took place at Krakow's Main Market Square, one of the city's most prominent tourist destinations and a major gathering point for visitors.

Around 15 million tourists visit Krakow every year, with most making their way through the historic square.

Krakow, Poland's second-largest city, is located approximately 250 kilometres (155 miles) from Warsaw, the country's capital and largest city.