The Swedish military has called off its week-long search for a suspected submarine in the sea south of Stockholm, officials say.
Naval vessels and planes have been searching the Stockholm archipelago for the last week, amid suspicions a Russian submarine was in trouble there.
Russia's defence ministry denied any of its ships were involved.
The vessel, whatever it was, is now believed to have left Sweden's territorial waters.
The Swedish operation was reported to have been the country's biggest military mobilisation since the Cold War.
In a statement, the military said (in Swedish): "This means the bulk of ships and amphibious forces have returned to port." It added that some smaller units would remain in the area.
Rear Admiral Anders Grenstad told reporters: "We assess that the [vessel] that violated our waters has now left."
"It's the assessment of the defence forces that probably foreign underwater activity has taken place in Stockholm's inner archipelago," he said, calling any such activity within Swedish territory "unacceptable".
The military believed at least one vessel was involved, he said, adding that it was probably not a large submarine, but "a small vessel".
Hundreds of people were said to be involved in the search, that the military said was based on "several credible operations".
Swedish officials had not said which country they thought was behind the "underwater activities", but there were widespread suspicions that the Russian navy was involved.
Russian officials have repeatedly denied any involvement, with a defence ministry statement saying: "There have been no extraordinary, let alone emergency situations, involving Russian military vessels."
Whatever the answers, what is clear is that Sweden's underwater defences are not up to scratch, the BBC's Malcolm Brabant reports.
A new submarine hunting helicopter is not due to come into service for a number of years, our correspondent adds.
Soviet submarine sightings caused Cold War security alerts in Sweden in the 1980s.
Russia's military intervention in Ukraine this year has fuelled suspicion about its intentions towards other neighbouring states, notably in the Baltic.
On Tuesday, Nato said its jets intercepted a Russian spy plane that had briefly entered Estonian airspace.
Russia said the plane had been on a training flight and had not violated Estonian airspace.
Sweden is not part of Nato but has tightened its ties with the alliance.
It signed a pact with Nato on 5 September, allowing it to engage in joint training exercises, and receive assistance from Nato troops in emergencies.