Austria’s leader called Thursday for more legal options to fight extremism and for an overhaul of the country’s domestic intelligence agency in the wake of this week’s deadly attack by an Islamic State sympathizer who authorities knew had tried to buy ammunition in neighboring Slovakia.

The gunman, identified as 20-year-old Kujtim Fejzulai, had a previous conviction for trying to join IS in Syria and had been given early release in December.

Slovakian authorities tipped off Austria on July 23 that two people using a car with Austrian license plates had attempted to purchase assault rifle ammunition at a shop in Bratislava. Austrian public security director Franz Ruf acknowledged Thursday that they had identified one of them as “probably” Fejzulai by Oct. 16 — more than two weeks before the attack — and said an independent investigation would look into whether mistakes were made.

“This commission will look into the process and evaluate it objectively,” Ruf told reporters in Vienna.

A dual national of Austria and North Macedonia, Austrian authorities said they were unable to revoke Fejzulai’s Austrian citizenship after his conviction and that he had duped the justice system’s deradicalization program after his release into thinking he had reformed.

Chancellor Sebastian Kurz told a special session of parliament on Thursday that Austria currently doesn’t have all the legal means necessary to monitor and sanction extremists, and that the government couldn’t allow a repeat of the situation that led to the attack Monday night. The gunman fatally shot four people and wounded 20 others with an automatic rifle before being killed by police himself.

Kurz didn’t detail his plans for changes, the APA news agency reported.

The suspect was shot and killed by police nine minutes after authorities received the first reports of gunfire in the city center, and Interior Minister Karl Nehammer commended police on their swift response.

That same night, they took 14 people with links to the suspect into custody and in all have now searched 18 homes and detained 15 people, Nehammer said. Of those, he said four had previous terror-related convictions and several others had records.

He previously said those detained range in age from 18 to 28 and all have immigrant roots. Some don’t have Austrian citizenship.

He said Swiss authorities, working in conjunction with Austria, also took two people into custody and that another country was also investigating leads on a possible link there. He wouldn’t identify the country because the investigation was ongoing, though earlier in the day German Interior Minister Horst Seehofer suggested in parliament there may be a link to extremists in Germany.

Nehammer also said Austria was working “intensively” with the FBI and had received “very significant information” from the U.S. agency. He didn’t elaborate.

In parliament, Kurz said Austria’s domestic intelligence agency had suffered a loss of trust with this and other recent scandals, APA reported.

“It now has to be repaired,” he told lawmakers.

Vice Chancellor Werner Kogler added that it was time for a “new start” and a “realignment” of the agency, known by the German acronym BVT.

He warned against “premature accusations,” however, saying an independent commission would determine where mistakes were made.

Vienna’s chief of police, Gerhard Puerstl, said he was confident the security services had done their job properly.

“I can guarantee you that we have a clear conscience,” he told reporters.