Speaking at a packed press conference on Friday, Supreme Commander of the Swedish Armed Forces Sverker Göransson revealed that a foreign vessel was in Stockholm's archipelago in October.
But he said the Swedish military had been unable to determine which country it came from.
"We have confirmation that there has been a small submarine in the archipelago," he told reporters.
Prime Minister Stefan Löfven added: "We will defend our territorial integrity using all means at our disposal."
He also announced the creation of a new national security council amid a deteriorating global security situation.
"There is no doubt that there has been a territorial violation of our waters," he said in English.
Stefan Löfven took questions from the Swedish media before rushing to a meeting with Albania's Prime Minister. Photo: TT
Speaking to The Local
after the press conference, Defence Minister Peter Hultqvist said that he was pushing for better coordination on defence issues between government departments.
"I think that there is a new security situation in the Baltic Sea…so we have a new environment and we have to handle that", he said.
But the minister insisted that people living in Sweden would be kept safe.
"Yes, I think so. We have no immediate threat against Sweden but we have a security environment around us that has changed in a negative way".
He added that he was "deepening discussions" with other countries in the region, especially Finland.
TIMELINE: Sweden's submarine hunt
Earlier this week an unnamed source speaking to the Svenska Dagbladet newspaper said the Swedish military believed it was "likely" that foreign underwater activity had taken place and classified the case accordingly, in the second most serious category out of a possible six.
The paper reported that encrypted radio traffic was intercepted from a transmitter in Kanholmsfjärden, an inlet in Stockholm’s archipelago. The receiver was in the Russian enclave of Kaliningrad.
At Friday's press conference Supreme Commander of the Swedish Armed Forces Sverker Göransson said that Sweden had "used all the available assets that we have in the royal navy" as part of its investigation, including using "different kinds of sensors".
But he refused to give further details of exactly how officials had confirmed the existence of the vessel, stating "that's top secret".
Warships, minesweepers, helicopters and more than 200 troops scoured an area about 30 to 60 kilometres (20 to 40 miles) from Stockholm in October following reports of a "man-made object" in the water, but the search was called off after the Swedish military said it believed that the suspect vessel had moved on.
The drama evoked memories of dozens of Cold War U-boat hunts in the 1980s.
In the most dramatic incident, a Soviet submarine U137 ran aground close to one of Sweden's largest naval bases in 1981 and was only allowed to leave after a humiliating wait.
Apart from that incident and several confirmed visual sightings, Sweden has never produced hard evidence of a Russian submarine in its waters.
Tomas Ries, an expert at the Swedish National Defence College said Friday's announcement was a major breakthrough for the Swedish military.
"During 10 years of obsessive Cold War submarine hunts, they never came up with anything, nothing at all," he told news agency TT.
"It's very uplifting to know that we have succeeded."