Serbian police say five people were killed and at least 20 wounded when a man opened gun fire inside a cafe in the country's north.
A police statement said the man "entered the cafe and opened fire with an automatic rifle, killing his wife and another woman, then he continued to shoot at other citizens in the cafe."
Interior Minister Nebojsa Stefanovic visited the scene and was quoted by N1 television channel as saying that the weapon was illegal that and jealousy was believed to be the motive.
It is the third mass shooting in recent years in Serbia, which has tried to reduce the number of illegal weapons in circulation since the Balkan wars of the 1990s.
The latest incident happened just after midnight in Zitiste, about 80 kilometers from the capital, Belgrade.
Police arrested the alleged shooter, born in 1978 and named only by his initials Z.S., and opened an investigation into the killings.
Stefanovic said the attacker tried to flee the scene, but police stopped and arrested him.
"We are all shocked that something like this could happen, since this was a very quiet man who had no police record," Stefanovic said, according to the state-run Tanjug news agency.
N1 channel reported that the attacker argued with his wife in the cafe, left the building, and returned with a Kalashnikov-type rifle with which he opened fire.
Two people were killed instantly, while three died after being taken to hospital in the nearby city of Zrenjanin, the channel reported.
Police said that seven of the wounded -- at least three of whom are minors -- are in "very serious condition."
The mass shooting is just the latest in recent years in Serbia.
In 2015, a 55-year-old man went on a shooting spree in a northern Serbian town in an apparent drunken rage over his son's wedding, killing six people, including the bride and her parents.
In 2013, a 60-year-old Serbian war veteran shot dead 13 people in the country's worst massacre in two decades as he rampaged through his tiny village about 50 kilometers south of Belgrade.