Sweden has confirmed that a small foreign submarine illegally entered its waters last month, though it remains unclear which country was behind the intrusion.

In unusually stark language for the non-aligned country, the prime minister, Stefan Löfven, warned that such incursions presented “enormous risks” for those involved and that Sweden would defend its borders “with all available means”.

On 17 October the Scandinavian country launched its biggest submarine hunt since the cold war after witnesses reported seeing an underwater craft in the archipelago that extends from Stockholm into the Baltic Sea. It called off the search after a week, saying the vessel had probably escaped into the Baltic.

Military officials did not blame any country, though most Swedish defence analysts believed Russia was a likely culprit. “It’s impossible … to confirm any nationality. But we can confirm the fact that it has been there,” the supreme commander, Sverker Göranson, said. He added that military sensors had evidence of the intrusion but declined to give details.

Löfven said the length of the Swedish coastline made it difficult to monitor but promised to strengthen the country’s ability to identify intruders. “Let me say this loud and clear, to those who are responsible: it is completely unacceptable,” he added.

Sweden built an anti-submarine force after a Soviet vessel with nuclear weapons ran aground off its southern shores in 1981, but began dismantling the force as part of defence cuts at the end of the cold war.