The police said in a statement that "the two men are charged with helping through advice and deeds the perpetrator in relation to the shootings at Krudttonden and in Krystalgade."
Meanwhile, the two men have denied allegations of giving the gunman shelter and getting rid of a weapon, according to Michael Juul Eriksen, the defense attorney for one of the two men.
On Saturday, gunman Omar Abdel Hamid El-Hussein, killed a man at a Copenhagen cafe. At the time, the cafe was hosting a debate on free speech, featuring the author of cartoons depicting Prophet Muhammad. On early Sunday, Hussein shot dead a man near a synagogue, according to the police. The shooter was gunned down by police officers hours later.
According to the police, the suspects helped Hussein obtain weapons and get rid of them after the shootings. Moreover, authorities say the suspects provided the gunman with a haven after the attacks.
The deadly shootings in Copenhagen may have been inspired by January terrorist attacks in Paris, which resulted in the deaths of 17 people, Copenhagen police concluded Sunday. The first of the Paris attacks was carried out on the office of satirical magazine Charlie Hebdo, known for its cartoons lampooning Islam.
The Copenhagen shooter could have been influenced by propaganda of some radical extremist organizations, Ekstra Bladet said, citing a member of the Danish Security Service.