"The Swedish defence forces can confirm that a mini u-boat violated Swedish territory. This is a serious and unacceptable violation by a foreign power," the Supreme Commander of the Swedish Armed Forces Sverker Goeransson told reporters.
He added that it was impossible to confirm the vessel's nationality.
The search, which stirred up memories of Cold War cat-and-mouse games with suspected Soviet submarines along Sweden's long, rugged coastline, involved battleships, minesweepers and helicopters as well as more than 200 troops.
"Those who consider entering Swedish territory illegally should be aware of the enormous risks it will mean for those involved in the violation," he said.
Also Read
"We will defend our territorial integrity with all available means. The armed forces has the necessary power to prevent a foreign vessel from getting away with it in a critical situation, and to do so with military force."
The October submarine hunt was triggered on October 17 after sightings of a "man-made object". Hundreds of reports from members of the public then flooded in, recording "something" in waters near Stockholm.
During the search, Russia denied it had a vessel in the area and claimed it might be a Dutch submarine that had been on a joint exercise with the Swedish navy prior to the October 17 sighting. The Netherlands denied that, saying its submarine had left by that date.