The low point came on Sunday evening.
For two days and two nights the Bank of England had, alongside the Treasury and its fellow financial regulators, been locked in talks with a stream of potential buyers for the UK branch of Silicon Valley Bank.
With the clock ticking down to the opening of financial markets on Monday morning, things were suddenly looking bleak.
For a time on Sunday morning, it had looked as if a buyer could be found from one of the Gulf states. But those talks had foundered.
Officials had been calling round British banks but they were nervous about stepping in to buy SVB UK.
Would they be liable if anything emerged about the way the bank had done business in previous years? What about anti-money laundering rules - would they be liable there too?
As the questions hung in the air, the Bank began to map through a worst-case scenario.
That was when the Bank of England intervened and took control: with its deposit base having nearly halved in the space of just over 24 hours (to £6.7bn by close of play Friday), it was clear that SVB UK couldn't survive on its own anymore.
By the time the Bank of England stepped in, executives at SVB UK seemed, as far as the regulators were concerned, to be relieved that they could at least stem the flow of deposits.
There was no question of getting an infusion of cash from the American parent bank (which had already effectively collapsed itself) so the only question was what kind of end SVB UK would face.
Could its demise be processed in an orderly manner or not?
There were, broadly speaking, three potential outcomes.
The first (and by far the most preferable) was to sell SVB UK in its entirety to another bank - ideally a British one, regulated in London.
The second was for a "bridge bank": the government would take possession of SVB UK and find a way either of running it down over time or running it until it could be sold off.
The third was formal insolvency. The bank would be wound down. Depositors would have the first £85,000 of their deposits insured but anything above that would depend on how much money could be recouped from the insolvency process.
The problem with the latter two options was that both would involve the deployment of public money.
But that Friday evening, with no potential buyers having surfaced, the assumption at the Bank of England was that SVB UK would face insolvency.
Officials made a terse public announcement along those lines, and then they got to work trying to find a buyer.
So began a long weekend at the Bank, and the biggest test yet of the "resolution" system put into place following the 2008 crisis, which promised to find a way to neatly wind up (or sell on) a bank in the event of collapse.
Hundreds of officials were drafted in - some in the Bank itself, some working from home, some from the other parts of Britain's financial regulatory system and some from the Treasury - to find a solution.
Governor Andrew Bailey - who was in Basel, Switzerland, for a regular central banker summit - was involved in all the calls.
Officials worked through the night, catching a couple of hours' sleep when they could.
The effort was given various codenames: at Threadneedle Street they called it "Operation Cork", in the Treasury it was "Operation Yeti" and the various potential suitors to SVB UK were also given their own codenames to prevent news of them leaking.
The talks progressed, day and night, from Friday through to Sunday.
While on Friday night insolvency looked like the most likely outcome, as Saturday progressed a few suitors emerged.
For a period it looked as if a buyer would be found in the United Arab Emirates. Then those talks unravelled.
And by Sunday night, the low point, insolvency once again looked like the most likely endgame.
No bank collapse is pretty, but SVB UK's threatened to be especially messy.
On the one hand, it didn't have individual customers - so there was no risk of hard-pressed households losing their savings.
This was a business bank, so the main victims would be companies. However, many of those companies had significant deposits at SVB UK.
By the close of play on Friday there were just over 4,000 customers of SVB UK.
Of these businesses, around half had less than £85,000 in their accounts, so would be fully protected by Britain's deposit insurance scheme, a post-crisis innovation which protects bank customers up to a certain amount.
However, that left just under two thousand businesses with large amounts of money in their accounts - the average deposit of these customers was £3.5m.
Some had far greater amounts, with certain companies having hundreds of millions of pounds.
These companies faced an existential threat if SVB UK had collapsed without a buyer.
While in such insolvencies much of the lost deposits are eventually recouped, it is a slow drawn-out process which invariably causes deep uncertainty and leaves scars among those depositors.
Of even greater worry inside the bank were a set of "fintech" companies which acted as "deposit aggregators", taking money from customers and then leaving some of that cash in a variety of other bank accounts.
Sky News understands that a number of these companies had significant amounts of customer money at SVB UK.
While those customer deposits would have been protected by deposit insurance in the event of a collapse, it would nonetheless have caused ripples of concern in the financial world.
As the officials worked through the night to find a buyer, they made plans for SVB UK's formal insolvency. They tried to work out whether they could farm out some of its accounts to other banks, but the talks were difficult.
Then, in the early hours of Monday morning, things started to change.
HSBC, which had surfaced in the negotiations so late that it hadn't even been given a codename, emerged as a serious buyer.
It wanted certain assurances - that it wouldn't face onerous anti-money laundering checks for its new customers and that it wouldn't have to take responsibility for any previous misconduct at SVB UK - but it was willing to buy SVB UK for £1.
By about 1am on Monday, the Bank's staff, bleary-eyed after a marathon weekend, realised that the worst seemed to have been averted.
HSBC was serious. The lawyers set to work on the contracts.
SVB UK would carry on operating, under the ownership of HSBC, who would gradually incorporate it into their business.
The thousands of customers - tech founders who had been facing potentially catastrophic consequences - would have all their deposits protected.
No public money would be deployed. It was, in the circumstances, about the best possible outcome.
On the one hand, said some of those involved, the episode illustrated the strength of Britain's bank resolution system.
A disaster was averted. No public money was deployed.
In the US, the Federal Reserve was forced to intervene and signal that it was standing behind customer deposits. The American parent faced insolvency; no buyer was found. By contrast, the UK's response looked like a triumph.
However, the episode underlines a few things.
First, the financial system remains vulnerable to these unexpected shocks.
Second, there are question marks about why tech firms put quite so much money - way more than was insured by deposit protection - into a single bank, and especially about the fact that some were reportedly coerced to do by their financial backers.
Third, given this was yet another earthquake triggered in large part by rising interest rates (the first being Britain's liability driven investment pensions crisis last autumn), what other bombs are buried in the system?
The final concern is that even as it helped confront this bank collapse, the Treasury is making plans to overhaul Britain's financial regulation.
Its proposals will, say some economists, pare back some of the controls and rules imposed after the financial crisis.
Some wonder now whether this episode underlines why those controls matter so much.