COPENHAGEN, Denmark — The slain gunman behind two deadly shooting attacks in Copenhagen was released from jail just two weeks ago and might have become radicalized there last summer, a source close to the Danish terror investigation told The Associated Press on Monday.
Two Danish sources close to the investigation confirmed to the AP that the slain gunman was named Omar Abdel Hamid El-Hussein. They spoke on condition of anonymity because Copenhagen police have not named the gunman, who they said was a 22-year-old Dane with a history of violence and gang connections. Several Danish media have already named him.
One source told the AP that El-Hussein had been in pre-trial detention for a long time but was released two weeks ago. He also said the corrections authority had alerted Danish security service PET last year after they noticed worrisome changes in El-Hussein's behavior last summer.
He wouldn't give specifics but said such alerts are issued when inmates change their attitude or behavior in way that "sets off alarm bells."
PET spokeswoman Lotte Holmstrup declined to comment on the report, saying "we are working on finding out what has happened."
PET director Jens Madsen on Sunday confirmed that the gunman was known to the agency before the weekend attacks in Copenhagen that killed two people and wounded five police officers. He said the gunman may have been inspired by last month's terror attacks by Islamic extremists in Paris that killed 17 people, but did not elaborate on when his agency began tracking him.
The news about the suspected gunman came as Danes mourned the victims of the country's first fatal terror attacks in 30 years — and, in an unusual development, some also put flowers on the street at the spot where police killed El-Hussein. The prime ministers of Denmark and Sweden were expected to join thousands of people at memorials in Copenhagen on Monday evening.
While a Danish court on Monday jailed two suspected accomplices of El-Hussein's for 10 days, Prime Minister Helle Thorning-Schmidt insisted there were no signs the gunman had any links to a wider terror cell.
"But we will, of course, in the coming time evaluate our fight against radicalization. We are already doing a lot," she said.
In November 2013, police distributed photos of El-Hussein because he was wanted for a stabbing on a subway train in Copenhagen. At the time, police said he stabbed a 19-year-old man in his left thigh with a large knife.
It wasn't immediately clear whether he was in pre-trial detention for that crime.
Investigators on Monday released more information about the gunman's movements between the attacks, one Saturday afternoon at a cultural center and another early Sunday outside a synagogue, both in Copenhagen.
Police spokesman Joergen Skov said the gunman visited an Internet cafe late Saturday, about six-and-a-half hours after the first attack. Police raided the facility on Sunday and detained four people, including the two men arraigned on Monday, Skov said. The other two were released.
Investigators released new images of El-Hussein and asked witnesses who had seen him enter or leave the Internet cafe to contact police.
"We are of course interested in whether he was alone and whether he was carrying anything and in which direction he went," Skov said.
Denmark's red-and-white flag flew at half-staff from official buildings across the capital Monday. Mourners placed flowers and candles at the cultural center where documentary filmmaker Finn Noergaard, 55, was killed and at the synagogue where Dan Uzan, a 37-year-old security guard, was gunned down.
There was also a smaller mound of flowers where the gunman was slain, which critics said was an insult to his victims. Ozlem Cekic, lawmaker of the left-wing Socialist People's Party, called it "a huge assault on the Danish population."
Denmark has been targeted by a series of foiled terror plots since the 2005 publication of 12 caricatures of the Prophet Muhammad in the Jyllands-Posten newspaper. The cartoons triggered riots in many Muslim countries and militant Islamists called for vengeance.
"I want to underline that this is not a conflict between Islam and the West," Thorning-Schmidt said. "This is a conflict between the core values of our society and violent extremists."
One of the participants in the free speech event targeted Saturday was Swedish artist Lars Vilks, who caricatured the prophet in 2007. Vilks, who was whisked away unharmed by his bodyguards, told the AP he thought he was the intended target of that attack.
Other participants said they dropped to the floor, looking for places to hide as the shooting started. The gunman never entered the center but sprayed it with bullets from outside in a gun battle with police.
World leaders, including British Prime Minister David Cameron, German Chancellor Angela Merkel and U.N. Secretary-General Ban Ki-moon, condemned the Copenhagen attacks.
"The terrorist attacks have the same causes in Paris and Copenhagen," Paris Mayor Anne Hidalgo said Monday as she visited Copenhagen in a show of solidarity. "Our cities are symbols of democracy, Paris and Copenhagen. We are here and we are not afraid."
Denmark's last deadly terror attack took place in 1985, when a bomb exploded outside the Copenhagen office of airline North West Orient, killing a 27-year-old Algerian tourist.
AP journalist Philipp-Moritz Jenne contributed to this report.