When Ferguson Shipbuilders went bust in the summer of 2014 it seemed the last shipyard on the lower Clyde was heading for oblivion, more than a century after it was founded by the four Ferguson brothers.
But within weeks, in a deal brokered by then First Minister Alex Salmond, a white knight stepped forward in the shape of Jim McColl.
A self-made billionaire, he was one of the most prominent business figures to support Scottish independence ahead of the referendum in September that year.
McColl, who made his fortune transforming the ailing Clyde Blowers into a portfolio of engineering investment companies, was adamant that Scottish shipbuilding could have a bright future.
Investment swiftly followed - the old buildings were demolished and replaced by state-of-the-art fabrication and design facilities.
The workforce at Ferguson Marine Engineering Ltd (FMEL) as it became known, rose from about 70 to 350, including apprenticeships in one of the most socially deprived areas of Scotland.
The new owner had plenty of ideas for the yard's future - refitting superyachts, fishing vessels, a new generation of hydrogen-powered ships.
Ferguson was also part of the consortium which was eventually named preferred bidder to build the Royal Navy's new Type 31e frigates.
Early work, however, came in the shape of orders for Scotland's publicly-owned ferry firm Caldedonian MacBrayne.
When McColl took over the yard it already had an order for a small diesel/electric hybrid ferry to keep it going - but in 2015 it received a major boost when it won a £97m order for two much larger ships.
Ironically this apparent lifeline was to have catastrophic consequences for the shipyard, eventually plunging it into administration.
The ferries were to be a hybrid design, powered by marine diesel oil and liquefied natural gas - not a particularly new technology in worldwide terms but a first for a UK shipyard.
The hull of the first ship - Glen Sannox - soon started taking shape - but behind the scenes something was going badly wrong.
Glen Sannox - destined for the Arran route - came off the slipway in November 2017 at a launch attended by First Minister Nicola Sturgeon.
But the ship was far from finished. Despite the fanfare the more eagle-eyed among the cheering crowds might have noticed that the windows of the bridge were filled not with glass but painted boards.
The ship was expected to enter service in mid-2018 but three years after its launch it remains moored beside the yard while work continues.
The second ferry, currently known as hull 802, earmarked for the Skye, Harris and North Uist route, is still being assembled and won't be ready until late 2022 at the earliest.
The cost of the work has risen to nearly £200m, more than double the original fixed price cost, and despite some controversial loans totalling £45m from the Scottish government the shipyard went bust in the summer of 2019.
Scottish ministers had been unwilling to stump up more cash, arguing to do so would break state aid rules.
Instead they ended up nationalising the yard, safeguarding jobs - but landing the public purse with the £100m bill to finish the ships.
There's been a lot of finger pointing. Jim McColl has repeatedly laid the blame for the problems at the door of CMAL- the company that owns and manages ferries and other assets on behalf of the Scottish government.
In a BBC interview he accused CMAL of making repeated specification changes - a claim denied by CMAL. The hybrid design also required lengthy certification processes from insurers and regulators, he said.
In its accounts his company FMEL blamed unforeseen costs on "post contract award, variations, interference, and disruption caused by the customer".
But that customer, CMAL, painted a different picture, accusing FMEL of rushing ahead with construction before completing the design work and getting the blueprints signed off.
After ministers took over the yard, a government report blamed poor project management while McColl's firm was in charge and a lack of financial controls.
McColl hit back, again insisting the fault lay chiefly with CMAL and suggesting it would have been cheaper to scrap the ferries and start again with a simpler design.
Now a damning report from a cross-party committee of MSP has branded the whole affair a "catastrophic failure".
All of the main protagonists, it says - FMEL, CMAL, Transport Scotland, government ministers - must take some responsibility for what went wrong.
The only group consistently absolved of blame are the workers at Ferguson shipyard itself whose morale must have been sorely tested by the saga.
The ferry deal was meant to provide a lifeline to a once proud workforce, but it ended up dragging down the Clyde's last commercial shipyard.