A man has shot three people dead in an apartment building in Augsburg, southern Germany, police said on Friday evening.
Two others were also seriously injured in the attack, according to police.
The 64-year-old man was arrested shortly afterwards in the Bavarian Langweid village, said police in northern Swabia in consultation with the public prosecutor's office. The man was allegedly stopped in his car and did not resist arrest.
The circumstances of the incident remained initially unclear.
The suspect allegedly killed the two women and a man at around 7:15 pm (1715 GMT) with a firearm in a multi-storey house in Schubertstrasse.
The deceased were a 49-year-old and 72-year-old woman and 52-year-old man.
He then went to a nearby house and injured a 32-year-old woman and a 44-year-old man with a firearm, it said.
The two are currently being treated in a hospital. A police spokesman said their injuries were not life-threatening.