Sweden’s navy HQ is returning to a vast underground cold war fortress designed to withstand a nuclear attack, in what has been seen as a defensive move against a resurgent Russia.

After a 25-year absence, the navy will once again be commanded from beneath billions of tonnes of granite as the country strives to build up its defences in response to the perceived threat from Moscow.

The top secret naval base on Muskö, about 25 miles (40km) from Stockholm, resembles a cross between Tracy Island from Thunderbirds and the film set of You Only Live Twice, where James Bond grappled with arch villain Ernst Blofeld in his headquarters beneath a volcano.

Completed in 1969, it boasts cavernous underground docks that can shelter warships, with miles of tunnels, offices and a hospital.

On its return to Muskö on Monday, the Swedish naval command said the new location would offer greater freedom of manoeuvre.

“The move is based on the calculation that the Russians could use powerful weapons which demand the level of protection that only Muskö can provide,” said Niklas Granholm, a senior analyst at the Swedish Defence Research Agency.

Sweden’s army and airforce commands are also moving out of the capital and into more fortified locations, spreading their headquarters geographically to make them less vulnerable to attack. But the navy’s relocation is the most dramatic, and emblematic of a revival of cold war sentiment in the country.

“The Muskö base is unique from a fortification perspective, it is an underground area as big as the old town in Stockholm,” said Rebecca Landberg, head of communications for the Swedish navy.

“The naval command must have resilience and function even under attack, so Muskö is the best option … the armed forces need to adapt their operations to meet the challenges posed by the deteriorating external environment.”

Like most European nations, Sweden cut its military spending sharply after the cold war ended, from about 2.5% of GDP in 1990 to barely 1% by 2010; equipment was scrapped and bases were closed down. The shipyard on Muskö was sold off to German engineering company Thyssen Krupp.

But the occupation and annexation of Crimea by Russia in 2014 “changed things completely”, Granholm said. “It showed that this is what Russia does to its smaller neighbours. Now it is proving a difficult and long-term task to rebuild the armed forces.”

Swedish defence company Saab bought out Thyssen Krupp in June 2014, after some arm-twisting that involved mass recruitment of Krupp’s staff and a dawn raid by the defence ministry on Krupp’s shipyards in Malmö, ostensibly to rescue military secrets.

A few months later, Stockholm was gripped with panic after an alleged Russian mini-submarine was spotted in its waters, reviving memories of a Soviet nuclear sub that ran aground in Karlskrona in 1981, sparking a decade of high-profile submarine scares.

The submarine hunt of 2014, details of which still remain unresolved, saw opinion polls swing towards Nato membership for Sweden and presaged the first of several boosts to defence spending. For the first time in more than two decades, the Swedish government embarked on a sustained expansion of the defence budget, pledging to increase spending from 43bn Swedish crowns (£3.5bn) in 2016 to 50bn in 2020.

Other recent moves to strengthen Sweden’s military preparedness include bringing back conscription, and a leaflet delivered to every household explaining what to do in case of a nuclear attack.

Though Muskö ceased to play a central role in Swedish defence in the 1990s, the navy never left the island entirely. When British and Belgian enthusiasts tried to infiltrate the base late last year, they were met with warning shots before being arrested.

But the facilities have fallen into disuse, and it will take several years for the base to be comprehensively modernised and renovated. According to the military officers’ trade union, the underground command centre will not be fully equipped until 2021 or 2022.