Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Five people were killed and at least 20 were injured when a man entered a cafe in northern Serbia in the early hours of Saturday and sprayed customers with automatic gun fire, security officials said.

The suspect was arrested after the attack, which occurred at 01:40 a.m. local time (7:40 p.m. Friday ET) in the village of Zitiste, close to the town of Zrenjanin about 50 miles north of Belgrade.

Serbia's Interior Ministry said in a statement that a man identified only as Z.S., in his late 30s, first killed his wife and another woman "after which he continued to shoot at other citizens who were in the cafe."

The scene of the shooting in the village of Zitiste, north of Belgrade. REUTERS TV / Reuters

It did not give a motive for the shooting, which it said was under investigation.

Serbia news outlet B92 quoted interior minister Nebojša Stefanović as saying that the man did not have a license for the weapon and that the attack was likely motivated by "jealousy," without elaborating.

A local resident, who was unidentified, told The Associated Press that the suspect was "a calm and quiet man."

"They were divorced, he could probably not take it, they had a son together," the resident said.