The people killed were men of 56 and 67 years of age and a 56-year-old woman, officials said.
German police on Saturday arrested the suspected killer behind a knife rampage that left three people dead at a street festival, an attack claimed by the Islamic State group.
The unidentified assailant fled after striking in the western town of Solingen late on Friday, sparking a day-long manhunt.
"We have just arrested the true suspect," North Rhine-Westphalia region interior minister Herbert Reul said on public television late Saturday evening.
"The man we have been looking for all day has since a short time ago been in detention," he said, adding that police found evidence to convict him.
In a statement on Telegram, IS's Amaq propaganda arm said that "the perpetrator of the attack on a gathering of Christians in the city of Solingen in Germany yesterday was a soldier of the Islamic State".
IS said the attack was carried out as "revenge for Muslims in Palestine and everywhere", in an apparent reference to Israel's war with Palestinian group Hamas in the Gaza Strip.
The claim has yet to be verified. German officials had earlier said that "a terrorist motive cannot be excluded" for the act.
A police spokesman earlier told AFP that officers had arrested a man in a raid at a hostel for asylum seekers, not far from the scene of Friday's attack.
Earlier on Saturday, a prosecutor said a first person was arrested: a 15-year-old suspected of failing to report a criminal act.
Witnesses had allegedly seen the teen discussing the attack just before it happened with a man who could be the killer, said Markus Caspers, prosecutor of Duesseldorf, just west of Solingen.
The people killed were men of 56 and 67 years of age and a 56-year-old woman, officials said.
"The victims were completely unknown with no known ties between them," Caspers told a press conference.
Four of the wounded were in a "serious" condition, officials said, revising down an earlier estimate of five.
Chancellor Olaf Scholz said the perpetrator "must be caught quickly and punished".
The attacker struck as thousands of people gathered for the first night of a "Festival of Diversity", part of a series of events to mark Solingen's 650th anniversary.
High terror alert
Germany has been on high alert for possible Islamist attacks after a series of atrocities.
Since the outbreak of the war in Gaza on October 7, the risk of Islamist plots has "worsened considerably", Interior Minister Nancy Faeser said, warning that "the threat posed by Islamist terrorism remains high".
Jihadists have carried out several attacks in Germany in recent years, the deadliest being a truck rampage at a Berlin Christmas market in 2016 that killed 12.
A police officer was killed and five people were wounded in a knife attack at a far-right rally in the city of Mannheim in May, with an Islamist motive suspected.
Friday's killing started as thousands of people had gathered in front of a stage for the first night of the three-day festival.
Witness Lars Breitzke told the Solinger Tageblatt newspaper he was a few metres away from the attack, not far from the stage, and "understood from the expression on the singer's face that something was wrong".
"And then, a metre away from me, a person fell," said Breitzke, who at first thought it was someone who had had too much to drink.
When he turned around, he saw other people lying on the ground amid pools of blood.
Solingen mayor Tim-Oliver Kurzbach said the whole city was in "shock, horror and great grief".
Faeser called for the country to "remain united" as she denounced "those who want to stir up hatred" during a visit to the site of the tragedy. "Let us not be divided", she said.
Series of knifings
Solingen is a city of some 150,000 people located between Duesseldorf and Cologne.
Up to 75,000 visitors had been expected to attend the "Festival of Diversity".
After the attack, "people left the scene in shock, but calmly," Philipp Mueller, one of the organisers, told the newspaper, adding that the rest of the festival was cancelled.
Scholz's centre-left coalition faces regional elections next week in the east of the country, where the far-right AfD is leading strongly in the polls.
Germany took in more than a million asylum seekers in 2015-2016 at the height of Europe's migrant crisis.
The influx was deeply divisive in Germany and fuelled the popularity of the AfD.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)