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

In unusually stark language for the country, prime minister Stefan Lofven warned that such incursions into Swedish territory presented "enormous risks" for those involved and that Sweden would defend its borders "with all available means".

The Scandinavian country launched its biggest submarine hunt since the Cold War on October 17 after receiving eyewitness reports of some type of 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 never blamed any country, though most Swedish defence analysts said Russia would be a likely culprit.

"It's impossible ... to confirm any nationality. But we can confirm the fact that it has been there," said supreme commander Sverker Goranson at a joint news conference with Mr Lofven and defence minister Peter Hultqvist.

Mr Goranson said the military obtained evidence of the intrusion with its own sensors, but declined to give details.

Mr Lofven noted that Sweden's coastline is as long as the US east coast, making it difficult to monitor, but promised to strengthen the country's ability to find and identify intruders.

"Let me say this, loud and clear, to those who are responsible: It is completely unacceptable," Mr Lofven said.

Sweden built up an anti-submarine force after a Soviet sub with nuclear weapons ran aground off its southern shores in 1981, but started dismantling the force as part of deep cuts in defence spending after the Cold War ended.

Anti-submarine helicopters were phased out in 2008 and replacements are not expected until 2018.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.