A gunman affiliated with the Islamic State had planned to attack a Catholic youth group meeting at a church in Vienna during his Nov. 2 terror attack, according to local media.

On Nov. 2, a gunman killed at least four people and injured more than 20 others in Vienna. The attack began at about 8 p.m. near the city’s main synagogue, with a heavily armed man firing a pistol and machine gun at people sitting outside bars and restaurants before being shot dead near a local Catholic church.

The Islamic State later claimed responsibility for the attack, releasing a video of a man identified as Abu Dagnah Al-Albany.

Austrian publication Kronen Zeitung is reporting that Al-Albany had wanted a bloodbath and tried to enter St. Rupert’s Catholic Church, where a Catholic youth group was gathered. He was unable to enter the building, as the gates were locked, and he was then shot dead by police.

The Vienna archdiocese said 17 people were in the church. Upon hearing shots fired, they turned off the lights and hid until 2:30 a.m. the next morning, when police cleared them to leave.

Austrian officials say the gunman’s real name was Kujtim Fejzulai, a 20-year-old Austrian man who last year was sentenced to 22 months in prison for attempting to travel to Syria in order to join the Islamic State. He was released early on parole, according to local media reports.

Austrian officials say they will be enhancing security measures at churches for Christmas.