Four men went on trial on Thursday accused of helping the gunman behind twin attacks on a Copenhagen synagogue and a free speech event last year that left two people dead.
The trial, being guarded by about a dozen heavily armed police, comes with Europe still on high alert over fears of jihadist violence following two bloody attacks in Paris in 2015.
Prosecutor Bo Bjerregaard accused the four defendants of trying to “destabilise or destroy Denmark’s basic political, constitutional, economic or societal structures”.
The killer, 22-year-old Omar El-Hussein, opened fire on February 14 last year outside a cultural centre where the speakers included Swedish artist Lars Vilks, a target of Islamic extremists since he portrayed the Prophet Mohammed as a dog in 2007.
A 55-year-old filmmaker, Finn Norgaard, died and three police officers were injured.
Later that night, the Dane of Palestinian origin fired six shots outside the city's main synagogue, killing security guard Dan Uzan, 37, and injuring two more policemen.
The assailant was shot dead by police hours later.
The trial, which is expected to run over 30 court days through September, is to focus on events in the hours between the two attacks, when the four men are accused of having aided the killer.
Bjerregaard said they had to have been aware of the intentions of the gunman, whom some had known since childhood.
After lifting a ban on disclosing their identities, the court named the four as Liban Ahmed Saleban Elmi, 20, Ibrahim Khalil Abbas, 23, Bhostan Khan Hussein, 26 and Mahmoud Rabea, 31.
The prosecution believes they are all guilty of committing a "terror offence" by providing El-Hussein with support in the form of ammunition, a hoodie and a bag used in the second attack, and by paying for his time in an Internet cafe where he located the synagogue.
Abbas and Elmi are also charged with helping him dispose of the weapon he used at the cultural centre.