The Scottish parliament is spectacular on many levels – not least in spiralling nine times over budget. But as these first pictures of the building show you get what you pay for.
It is, even most Scots would agree, something of an irony. The country that has a reputation for looking after the pennies has bought itself a national parliament building for a cool £338m. That is nearly nine times the price originally quoted.

In their defence, Scottish parliamentarians plead that the original cost estimate of £40m – given to the late Scottish secretary, Donald Dewar, in 1997 – was for a generic office building, not a bespoke parliament. Anyway, the Scottish parliament was not set up until July 1999, and then it exercised its prerogative to triple the number of its committees needing rooms, increase its staff from 400 to 1000, expand the overall floor area threefold. More recently, the entire external envelope was reinforced to make it blastproof.

And then there's the architectural design, which is now taking strong physical shape on its site at the foot of Edinburgh's Royal Mile. Nobody could mistake this building for a bog-standard office block. Even as it currently stands, sheathed in dense scaffolding, its tight-knit cluster of angular shapes projects a strong charisma.

As designed by the late Catalan architect Enric Miralles, in association with the local practice RMJM, it is a swirling concoction of curvilinear organic forms, inspired, Miralles said, by upturned wooden boats seen at Lindisfarne, leaves floating on water, watercolours of wild flowers by Charles Rennie Mackintosh and, most whimsically of all, an 18th-century painting of a skater hanging in the Royal Scottish Academy.

Any self-respecting Scot could have seen straightaway that such a rich mix of picturesque imagery would not come cheap. And what do these impossibly romantic artistic notions and wilfully irrational forms have to do with the backbiting world of modern national party politics, anyway?

One answer is that inside every no-nonsense Scotsman there lurks a romantic dreamer. Dewar, along with all the others on the selection panel, was seduced by the vision of Miralles, whose competition sketches radiated all the panache with which Catalonia devolved itself from Castillian Spain in the 1980s and 1990s, fused with the imaginative legacy of Barcelona architect Antoni Gaudí. Miralles in return had been seduced by Edinburgh, which he had visited as a student two decades earlier, sketchbook in hand.

And, far from least, there's the site itself – or rather its location. It had been occupied by the city's main brewery, which might have suggested another brownfield regeneration project – worthy but dull. But its location is one of the most jaw-dropping of any European city.

At its main public entrance, the site opens on to the Royal Mile, Edinburgh's medieval main thoroughfare, hemmed in by tenements, dark alleyways no wider than doorways, burghers' mansions and the occasional church set in its graveyard – all united by their fabric of light grey sandstone. Along the west side, Scotland's royal palace, Holyrood House, spreads in renaissance grandeur across manicured lawns. And just a few steps beyond the rear boundary, the scene again changes abruptly, this time with Monty Pythonesque improbability, as Salisbury Crags, a colossal rocky chunk of Scottish Highlands erupts vertically 200 m into the sky.

In this astonishing location, Miralles' romantic swirling forms come into their own. Happily, he has steered well clear of any laboured reinterpretation – still less, replication – of Scottish vernacular architecture. Instead, Miralles winds together moulded sculptural forms – strong, abstract and modern, though resonant with echoes of Scottish places and history – into an extended architectural symphony of five distinct yet related movements. The massive rounded form of Le Corbusier's chapel at Ronchamp in France – arguably the most compelling sculptural building of the 20th century – can be recognised as Miralles' prime design inspiration. Just inside the main politicians' entrance rises a dense cluster of four towers containing the debating chamber for the 129 members of the Scottish parliament, or MSPs, six committee chambers and parliamentary offices. The four towers are all shaped like boats and point sharp prows at the visitor, with the block on the street frontage cantilevering a dramatic 18 m over the main entrance. This is Miralles' modern organic response – obliquely inspired by flower petals – to the medieval congestion of the Royal Mile, while the double-curved elliptical roof forms – the upturned boats – present a sculptural roofscape when viewed from the top of Salisbury Crags.

The public lobby lies to one side of the cluster of elliptical towers. Here are more elliptical forms, but these are much lower down and coalesce into an extended glazed roof over the lobby hall. Dynamically curving shapes of clear glass, oak boarding, glu-lam struts and steel ties – Miralles' floating leaves – intertwine overhead in a mesmerising, swirling dance.

The main cluster of towers ends in a sheaf of long "tails" that snake out towards Salisbury Crags. These are strips of landscaping raised above plant and store rooms, and, in Miralles' mythology, allude to the mountain paths along which Scottish chieftains strode to clan gatherings.

The block of MSPs' accommodation is something completely different. Instead of swirling elliptical shapes, this is a six-storey slab block of 130 chambers, all of which face outwards from the eastern site boundary. The sculptural elements here are the outlandish projecting oriel windows to each chamber, each of which comes in a complex irregular outline of curves, angles and steps that has been compared with a hen pecking corn and is overlaid by random collection of what seem to be bamboo sticks. Fascinatingly whimsical on the outside, the composition shows its logic on the inside, where each projecting bay has been ergonomically shaped into a cosily curved, timber-lined window seat from which the occupant MSP can contemplate the nation's destiny.

The final piece is a sad let-down from the sustained creativity of the rest of Miralles' vision. This is Queensbridge House, a 17th-century mansion house block that is being converted into administrative offices. Over the centuries, the block had been badly hacked about and then abandoned, and Miralles intended a contemporary conversion. Unfortunately, Scotland's conservation lobby got the upper hand and insisted on full historical restoration. The result delivers an unnerving culture shock when passing from the restored historical building to the swirling modern foyer.

So, what will the Scots make of their new centre of democracy when it is completed in November? Will they continue to wail about the ninefold cost increase? Or will they, like Donald Dewar, be swept off their feet by this romantic, swirling symphony of architecture? Will they venerate it as a memorial to its two visionary begetters, Miralles and Dewar, who both died in 2000 without seeing the fruit of their labours? Then again, will the MSPs and their civil servants find it increasingly difficult to fit changing government procedures into the irregular forms set in concrete?

One thing is certain: the powerful, highly imaginative forms of the building will not go unnoticed. After years of sniping at escalating costs, The Scotsman newspaper came out earlier this month with a 2000-word eulogy on "a marvellous butterfly [that] is going to emerge to astonish us".

Unless it proves impractical to use, a building that people notice and talk about can quickly become a building that they take to their hearts.

Principal subcontractors

Concrete substructure, frame, hard landscaping
O’Rourke Scotland
Fit-out to towers
Public lobby roof, MSPs’ oriel windows, specialist glazing
Roofing, ventilation
Debating chamber windows, blastproofing
Drawn Metal
M&E services, plumbing Rotary carpentry and joinery to MSPs’ chambers
Ultimate Finishing Systems
Stone cladding