BERLIN — Austria's interior minister acknowledged Friday that there had been "intolerable mistakes" in tracking the gunman in a deadly shooting Monday in Vienna as he ordered the closure of mosques deemed to be a security risk.

German intelligence had requested that Austrian authorities monitor several Germans who met with the gunman, Kujtim Fejzulai, during a trip to Austria this summer, Interior Minister Karl Nehammer said at a news conference.

But Austrian authorities did not change their risk assessment of Fejzulai, who had been released early from a 22-month jail sentence for attempting to join the Islamic State. Nehammer initially said that Fejzulai had “fooled” the country’s deradicalization program, but the justice ministry has responded, arguing that they considered him a risk and that it was the interior ministry’s job to track him.

Nehammer said Friday that there were “immediate personnel consequences,” as Austrian News Agency APA reported that Erich Zwettler, head of Vienna’s local intelligence office, had resigned.

In Germany, police said they had carried out raids Friday on the homes and offices of four people linked to the 20-year-old attacker.

Fejzulai, who was born in Vienna but also held a North Macedonian passport, killed four people and wounded more than 20 others when he opened fire in Vienna’s central nightlife district Monday night as residents enjoyed the last few hours before the country went into a new coronavirus lockdown. Fejzulai was fatally shot by police officers.

The case has drawn attention to the failings of Austria’s security services and its deradicalization program. It emerged Thursday that Slovakia had warned Austrian authorities in July that Fejzulai was trying to buy ammunition for an assault rifle.

Nehammer blamed a problem with “communication.”

One mosque and one Islamic center frequented by Fejzulai were closed Friday. Integration Minister Susanne Raab said institutions that are “hotbeds for the blind hatred and violence we experience on Monday” would be closed.

Denise Hruby in Vienna contributed to this report.