Denmark's domestic intelligence service has admitted prison officials alerted the agency last year to the gunman in last weekend's shootings in Copenhagen that killed two people and wounded five.
The Danish Security and Intelligence Service, known by its Danish acronym PET, said the report in September did not give any reason to believe the 22-year-old was planning an attack.
PET also said it did not have any intelligence before the gunman's shooting sprees at a cultural centre and synagogue that an attack was imminent.
Gunman Omar Abdel Hamid El-Hussein was released from jail about two weeks before the attacks after serving time for a stabbing attack.
El-Hussein was arrested 15 months ago for a knife attack on a train passenger. While he was awaiting trial, a change in his behaviour last summer set off enough "alarm bells" for jail authorities to alert PET, a source said.
Such warnings usually set in motion counter-radicalisation efforts, such as counselling in jail.
It was not immediately clear how aware the court was of this issue before El-Hussein was convicted of a lesser charge.
Sentenced to the time he had already served, he was released about two weeks ago, the source said.
"We are working on finding out what has happened," PET spokeswoman Lotte Holmstrup said.
The agency's director, Jens Madsen, has confirmed the agency had been aware of the gunman and that El-Hussein might have been inspired by last month's attacks by Islamic extremists in Paris which killed 17 people.
He opened fire at a cultural centre and a synagogue - targets that resembled the Paris attackers' rampage at the Charlie Hebdo newspaper and a Jewish grocery store - before he was killed in a gun battle with a SWAT team early on Sunday.
His victims included Danish documentary film-maker Finn Norgaard and a Jewish security guard, Dan Uzan, while five police officers were wounded.
Denmark's prime minister and crown prince and foreign dignitaries joined about 30,000 people honouring the victims on Monday night outside the Krudttoenden cultural centre.
A judge ordered 10 days of pre-trial detention for two people accused of helping El-Hussein get rid of a weapon while evading authorities.
Both men deny the charges, said Michael Juul Eriksen, a defence lawyer for one of the two.
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article