The shooter in Krakow died in hospital.
Six people were killed and more than 10 were injured, including a Russian woman and citizens of Great Britain, Austria, Germany and Portugal.
The police found the bodies of three of his relatives in the attacker's house.