A gunman armed with a machine gun and two pistols killed seven people and wounded 15 others before killing himself in the Slovak capital Bratislava on Monday, officials said.

Police patrol the scene as a covered body lies on the ground Monday after a man opened fire at a high-rise apartment building in Bratislava, Slovakia, killing seven people and wounding 15. Police patrol the scene as a covered body lies on the ground Monday after a man opened fire at a high-rise apartment building in Bratislava, Slovakia, killing seven people and wounding 15. (Bela Szandelszky/Associated Press)

Five of those killed — four women and a man — were members of a Roma family who lived in the apartment where the shooting began, Interior Minister Daniel Lipsic said.

Another man shot and killed outside the high-rise building was likely part of the same family, Lipsic said.

The seventh fatality was a woman who was shot as she walked to the balcony of her apartment when she heard the gunfire.

Members of the ethnic Roma minority, also known as gypsies, often face discrimination in Eastern Europe, but Lipsic and police chief Jaroslav Spisiak said the unidentified gunman's motive was not known.

"So far, we don't know the motive ... so I will not speculate whether it did or did not have [a] racial motive," he told reporters. "I doubt it, but, of course, the investigation is ongoing."

The shooting took place mid-morning in the rundown Devinska Nova Ves neighborhood on the outskirts of the Slovak capital, which is surrounded by fields and industrial areas.

Police rushed to the scene as the gunman, about 50 years old, was leaving the building, and he fired indiscriminately at people in the area, wounding 15, including a policeman and a three-year-old boy who was shot in the ear, Lipsic said.

Emergency crews blocked off the scene and authorities urged people to stay indoors.