Police guard Copenhagen's Great Synagogue on the morning after the attacks. Photo: Simon Læssøe/Scanpix
The four stand accused of committing “terror offences” by providing support for Danish-Palestinian Omar El-Hussein ahead of the second attack, which took place outside a synagogue.
El-Hussein, 22, was shot dead by police hours later, having killed two people and wounded five.
The prosecution said it could prove the four suspects were in close contact with El-Hussein in the hours after the first attack.
“There has been a very comprehensive investigation involving a very large number of police,” prosecutor Bo Bjerregaard told AFP.
On February 14, 2015, Danish-born El-Hussein opened fire with an automatic rifle outside a cultural centre hosting a free speech event attended by Swedish artist Lars Vilks, reviled by Islamists for portraying the Prophet Mohammed as a dog in 2007.
In what is believed to have been an attempt to stop the assailant outside the centre, filmmaker Finn Nørgaard, 55, was killed and three police officers were wounded.
Later that night, El-Hussein — seemingly inspired by the attacks on French satirical weekly Charlie Hebdo — headed to the city's main synagogue, where he shot 37-year-old Jewish security guard Dan Uzan.
Second attack in focus
As the shots were fired outside, an eerie silence fell inside Copenhagen's Great Synagogue, where worshippers were celebrating a Bat Mitzvah, a Jewish girl's coming of age.
Claus Bentow, the girl's father, said he “tried not to think too much” about the trial.
“Everyone in the family has seen a psychologist. We are all deeply affected,” he told AFP.
As preliminary hearings were closed to the public, little is known about the suspects, all of whom deny the charges.
“My client pleads not guilty and looks forward to finally starting the trial. It's now been almost a year since he was arrested,” said Berit Ernst, a lawyer for one of the men.
Aged between 20 and 31, all are believed to be Danish citizens but two hold dual citizenship and could risk deportation, according to Danish media.
They are accused of having provided the killer with ammunition, a hoodie and a bag — all used in the second attack — and for having paid for his time in an Internet cafe where he located his second target, the synagogue.
Two of the men have also been charged with helping him get rid of an M95 assault rifle he used outside the cultural centre.
The four have been detained since February and March last year and could face life in prison if found guilty.
The prosecution has set aside 30 court days for the trial.
A fifth man was released in January — allegedly El-Hussein's younger brother — and the charges against him have been dropped.
Bentow said he was troubled by the man's release, and that he thought it was unlikely El-Hussein had been acting completely alone given widespread anti-Semitism in the immigrant community where he grew up.
“Of course there are others around him who also think (his actions are) a good idea, and who maybe do not dare to do the same as him, who offer help with what they can,” he said.
Observers say it could be difficult for the prosecution to apply Denmark's terrorism law since it would have to prove that the four suspects knew about El-Hussein's plans.
A petty criminal known for his violent temper, El-Hussein was released from prison two weeks before the attacks, having served time for a stabbing.
On the day of the attacks, he reportedly pledged allegiance to the Islamic State group on Facebook, also posting a link to a video of a violent Islamist hymn.
Hundreds of people attended his Islamic burial outside Copenhagen. Some were known gang members, while others said they wanted to show support for the killer's family.
Danish intelligence agency PET has been criticised for failing to act on information from prison services that El-Hussein was at risk of radicalisation, and former classmates have claimed they tried to warn police as early as 2012.
Copenhagen politicians have since launched a plan partly inspired by the smaller city of Aarhus' “soft hands” approach to battling the radicalisation of young Muslims with social techniques used in gang exit strategies.