Community spirit may be in decline in an era of Asbos and digital avatars, but it's thriving in Lerwick. Viewed from the urban cluster of Scotland's central belt, Shetland's main town can seem impossibly remote: separated from the mainland by 130 miles of water; population about 7,500; climate inhospitable.

But on two brief visits, I've been struck by Lerwick's self-assurance and sense of identity as the heart of an archipelago community with 15 inhabited islands.

This civic confidence is now finding expression in the Shetland Museum and Archives - an £11.5m new-build project, planned to open in March next year. As well as uniting the existing museum collection and paper archives under one roof, the new premises will be a 'heritage hub', underpinning a network of smaller museums and heritage groups throughout the islands.

The seafront development also includes the restoration of Hay's Dock, which was built in 1815. Crucially, this allows unprecedented access to Shetland's maritime culture. It has also regenerated a brownfield site.

The project's origins go back a long way. According to the curator of the museum, Tommy Watt, The need for new facilities was apparent 27 years ago, when he began work at the old museum in the town centre.

'Even then it was beginning to get cramped,' he recalls. 'It's a four-sided glass box - a greenhouse basically - with a solid roof. When they built it in 1966 people said, "Oh, you'll never fill that," but it filled up pretty quick. Since then it's had very little maintenance: the windows were cracking, the floors were rotting, the roof needed replacing. To remain there would have cost £1m minimum.'

Watt says: 'By the early 1990s, the impetus for a new museum became very strong. In recent years, there has been more focus on our culture; not just on preserving it, but on selling it as a product. Before then, the focus was on the traditional industries - fishing, oil, knitwear, that sort of thing.'

Shetland Islands Council began exploring options for a new museum, but it was not until about 1995 that Hay's Dock emerged as the leading candidate. In 1998, the site was offered for sale at an affordable price, and the council approached the Shetland Amenity Trust (SAT) to develop the project.

Originally formed in 1983 to channel oil funds into environmental and heritage projects, SAT was well placed to assemble a bid, and eventually raised nearly £10m from ten bodies including the Shetland Islands Council's Charitable Trust and the Heritage Lottery Fund.

Alan Blain, the deputy manager of SAT, believes the successful appeal to funders was partly down to positioning the new museum as a hub, which would collaborate closely with satellite organisations around the islands.

'I think what the lottery particularly liked was that we were showing an integrated approach with the local museums,' he says. 'We weren't just building the museum and saying "This is it". We presented it as being very much for the whole of Shetland. This was seen as quite revolutionary.'

Inevitably, there were hitches and as SAT's project manager, John MacKenzie, admits, they manifested themselves quite quickly. 'The site is on a flood plain and, with global warming and rising sea levels, that had to be addressed very early on,' he says. 'When we went for planning consent, they asked for a further study, and it ended up with the floor level being lifted by 300mm. And then you dig into the rock and it's not quite the rock you thought was there…'

The museum's foundations rest on a combination of soft and hard rock, and it emerged that these had been misjudged, demanding hasty revisions to the plans. 'The project started towards the end of 2002 and by the middle of 2003 we'd almost committed our whole contingency budget because of these major unforeseen events,' says MacKenzie.

Fortunately, this crisis was eased earlier this year when SAT managed to secure a further £1.7m in top-up funds. 'With lottery applications, you nail your colours to the mast over budget and eight years is quite a long time.' says Blain.

Now the building is almost complete. Flanked on one side by a working boat shed with a salvaged winch, and on the other by the boat hall, it looks out across the restored dock to the sea. Watt takes me on a short boat ride down to the town's main harbour. The restoration of working boats will form a key element of the new museum's work and he hopes that it will help attract tourists.

Two damaged German ships were hauled ashore at Hay's Dock in the 1870s and used as stores. Now part of the keel of the Elenore Von Flotow has found a new life as the museum's reception desk.

This is fitting for an island that has very few trees and which for many years relied on flotsam as a prime source of timber; indeed, recycling has been central to the development.

The foyer is paved with old Shetland flagstones, and the dock features cobbles taken from Lerwick's esplanade 40 years ago. The museum's wooden floors are all recycled, and even the artificial floor tiles are made from recycled glass.

The galleries look spacious and bright, and are supplemented by an attractive cafe and an audiovisual auditorium, both of which can be opened outside normal hours. But a museum is nothing without its collection and displays. In eight years of planning, the curatorial staff have poured inspiration and perspiration into presenting Shetland's rich history and culture in 3,000 objects and 80 display cases.

Ian Tait, the curator of collections at the museum, says: 'Our underlying vision was that we would be able to tell the story of Shetland in three dimensions, so we can really give it credit where it's due. All the galleries have been thought out in a holistic manner, in terms of gallery layout, case provision and the structure of the narrative.'

Broadly speaking, the artefacts are arranged chronologically: the ground floor covers the centuries from prehistory all the way up to the industrial revolution; while the upper floor provides a more detailed social history of the past two centuries. Each floor is divided into six zones, which relate to each other both sequentially and thematically.

Although the bulk of the artefacts were already part of the collection, the rehousing process revealed gaps in the story, many of which were filled by donations.

Tait cites one example. 'We needed a tractor to be emblematic of the mechanisation of agriculture, because that's a large part of our storyline. Our chosen type was a two-wheeled tractor, produced in the late 1940s. So we put the word out and within a short time an islander very kindly offered us a tractor in perfect running condition.'

Tait's one lament is 'the gradual realisation that we would have nowhere near enough room' for everything dreamed of in the project's infancy. But that's not a complaint shared by Brian Smith, Lerwick's archivist since 1976.

Having spent 30 years in 'a series of very inadequate premises', the archive is now being lovingly transferred to a cool, dry, fireproof chamber that Smith proudly notes is 100 per cent compliant with BS 5454: 2000 - the British Standard for document storage.

A vast research resource, the archive will now be fully integrated into the museum's facilities. A digital catalogue is already installed, and there are plans to make it accessible via the internet. Meanwhile, the newly amalgamated archives and museum staff have been collaborating to produce the building's interpretative panels.

'We have tried to present a picture of Shetland's past that's complex and not sentimental,' explains Smith. 'It's not Disneyland here at all, but we have tried to do it in a way that makes it accessible to everybody.'

The prevailing atmosphere, with completion tantalisingly in sight, is one of impatience. Tommy Watt is under no illusions: it'll be a few months before the new building is running smoothly. But he says the real work starts after that. 'You can supply leaflets and websites and all that sort of stuff, but the real hub concept is going to come from us and the communities. And for the first few years, I think that is going to be our key focus.'

Andrew Burnet is a freelance journalist based in Edinburgh