Denmark police on Monday charged two people for aiding a gunman, who launched two terror attacks that left two people dead and injured five police officers this weekend. The two men had planned to help the gunman hide, prosecutors said, according to CNN.

The two were reportedly arrested Sunday and were also accused of helping the gunman get rid of a weapon, defense attorney for one of the two suspects, Michael Juul Eriksen, told public broadcaster DR, according to AP. The gunman reportedly killed two people -- a Danish filmmaker and a member of Denmark's Jewish community. Local media reportedly identified the gunman as Omar El-Hussein. However, the name is yet to be confirmed by authorities.

"The two men are charged with helping through advice and deeds the perpetrator in relation to the shootings at Krudttonden and in Krystalgade," police said in a statement, referring to the site of the two attacks.

On Saturday, the gunman launched an attack at a cultural center hosting a seminar in Copenhagen and hours later attacked a synagogue.

Authorities believe that the attack was aimed at artist Lars Vilks, who was present at the seminar titled “Art, Blasphemy and the Freedom of Expression.” Vilks has been subjected to several attempted attacks and death threats since he made a caricature of the Prophet Muhammad in 2007.

Police reportedly said that the 22-year-old gunman had a long rap sheet and may have been inspired by last month's terrorist attack on the French satirical weekly Charlie Hebdo, which frequently published controversial cartoons depicting Islam and the prophet.

"Denmark and France are the same nations, feeling the same sadness but also the same will to resist, fight and defeat terrorism," French President Francois Hollande reportedly said. "They hit the same targets, they hit what we are, what we represent, the values of freedom, the rule of law, that all citizens, whatever their religion, should be able to enjoy."