The trial began Tuesday in Norway for a man accused of aggravated terrorism for the deadly shooting at an LGBTQ+ festival in Oslo's nightlife district.

Two people were killed and nine seriously wounded in the shooting at three locations, chiefly outside the London Pub, a popular gay bar, on June 25, 2022.

MAINE MASS SHOOTING SUSPECT ROBERT CARD HAD TRAUMATIC BRAIN INJURIES, NEW SCAN SHOWS

Prosecutor Sturla Henriksbø said Zaniar Matapour, 44, allegedly fired 10 rounds with a machine gun and eight shots with a handgun into a crowd. Matapour, a Norwegian citizen originally from Iran, had sworn allegiance to the Islamic State group, Henriksbø said.

Zaniar Matapour

Zaniar Matapour in Oslo courthouse Tuesday, March 12, 2024. The trial has begun in Norway for a man accused of aggravated terrorism for the deadly shooting at an LGBTQ+ festival in Oslo’s nightlife district. Two people were killed and nine seriously wounded in the shooting in June 2022. The prosecutor says the Norwegian citizen originally from Iran had sworn allegiance to the Islamic State group. (Lise Åserud/NTB Scanpix via AP)

Matapour was detained by bystanders. Following the attack, a Pride parade was canceled, with police saying they couldn't guarantee security.

Matapour has refused to speak to investigators. If found guilty, he faces 30 years in prison.

In Oslo District Court, Matapour asked the judge why the trial was held during the Muslim fasting month of Ramadan. Judge Eirik Aass replied that "I have not perceived that there is a conflict in carrying out the case even though it is Ramadan."

Henriksbø said that Matapour was born in Iran of parents of Kurdish background. The family fled to Norway when he was 12.

CLICK HERE TO GET THE FOX NEWS APP

The shooting shocked Norway, which has a relatively low crime rate but has experienced so-called lone wolf attacks in recent decades, including one of the worst mass shootings in Europe. In 2011, a right-wing extremist killed 69 people on the island of Utoya after setting off a bomb in Oslo that left eight dead.