“If you can, avoid Drottninggatan today. A lot can happen there…just so you know,” the message said, according to the TT news agency.
Armed Forces spokesperson Jonas Svensson told TT on Sunday he was unaware of the message.
“I haven't heard about this at all. Now I'm going to check out the information,” he told TT when confronted with the news.
Later the Swedish military said it was now “preparing how the issue will be dealt with”.
“The Swedish Armed Forces did not know ahead of time about the plans or the circumstances surrounding the events which have taken place. If that had been the case, (Swedish security service) Säpo, which is the responsible agency in these types of cases, would have been informed immediately,” said military spokesperson Erik Lagersten in a statement.
Swedish intelligence agencies may have known that something was in the works, Wilhelm Agrell, a professor in intelligence analysis, told TT.
“A warning is a slippery term and nothing concrete. Warnings can consist of very precise information that can be acted on, but it's common that warnings are more diffuse and can't be acted on,” Agrell said.
On Saturday night, TT spoke with John Daniels, head of security for Swedish military intelligence agency MUST. But he refused to comment, instead directing all inquiries to Säpo.
Säpo said on Sunday it was taking over the investigation of the two blasts, which occurred within minutes of one another and about 200 metres apart on Drottninggatan, a busy shopping street in central Stockholm.
The agency considers the explosions to be a terrorist crime.
One man believed to be a suicide bomber was killed in the second blast, while the first explosion injured two others.
Shortly before the explosions, Säpo and the TT news agency received a message from a 29-year-old man from southern Sweden who claimed that the prophet Mohammed was being degraded.