The attacker was known to the authorities and had previously been convicted of attempted jihad and attempted membership in a terrorist organization, after he tried unsuccessfully to travel to Syria to join the Islamic State, Mr. Nehammer, the Austrian interior minister, said Tuesday.
He was sentenced to 22 months in prison but was allowed out early, Mr. Nehammer said.
He defended the decision to release the young man, pointing to his good behavior in prison. And he insisted the young man had appeared to be “fully integrated” into society — though evidence found in his apartment, including a stockpile of munitions, after the attack told a different story.
“There were no warning signs about his radicalization,” Mr. Nehammer said, promising to review the justice system to try to ensure that a similar mistake not be made again.
Before setting out on his attack, the man posted a photograph of himself to social media. It showed him wielding a machete and a rifle with a message that “clearly indicated his sympathy for I.S.,” the minister said, referring to the Islamic State.
The lawyer who represented the man in 2018 after he was caught trying to join ISIS said there had been no indication he was dangerous. The lawyer, Nikolaus Rast, said his client had planned to travel to Syria to join the extremist group with a friend, but only got as far as Turkey before being arrested.
There was no suggestion that his parents shared his views, and, in fact, the man’s mother was the one who alerted the authorities when he went missing, Mr. Rast said.
Mr. Rast said that his client’s remorse after returning to Austria seemed genuine and that his behavior in prison was such that he was released after only about a year of his 22-month sentence. He took part in a special de-radicalization program, the lawyer said.