Police said the men are not suspected of involvement in Monday’s shooting, but had links to the attacker.
German police have raided the homes and businesses of four men linked to the ISIL (ISIS) sympathiser who carried out a deadly attack in Vienna this week.
Federal police on Friday said officers, including members of the anti-terrorism unit GSG9, searched premises in Osnabrueck, Kassel and Pinneberg county.
Police said while the men are not currently suspected of involvement in Monday’s shooting, there is evidence they had links to the attacker.
Four people and the gunman were killed in the attack, and 20 people including a police officer, were wounded.
German federal prosecutors said two of the men are believed to have met the attacker in Vienna this summer. A third man had contact with him online, while the fourth had no direct contact with the attacker but was in touch with people who knew him.
The prosecutors said they were trying to collect possible evidence during the searches and nobody was arrested.
Authorities in Austria have identified the attacker as 20-year-old Kujtim Fejzulai, a dual national of Austria and North Macedonia who had a previous conviction for trying to join ISIL in Syria and had been given early release in December.
An investigation has been launched into why Austria did not put Fejzulai under observation despite being tipped off by Slovak authorities that he had tried to buy assault rifle ammunition at a shop in Bratislava in July.
Austrian authorities have searched 18 homes and arrested 15 people in the country in connection with the attack. Four of them had previous “terror”-related convictions and several others had criminal records. Authorities in neighbouring Switzerland also took two people into custody this week.