JP Morgan was later hailed as both hero and villain
Almost exactly 100 years ago at 4.45 in the morning of a November day on the corner of Madison and 35th Street in New York a group of some 50 or so exhausted men stumbled out into the street.
Some had not slept for days.
Behind them, on the other side of the monumental brass doors that closed behind them, they left a piece of paper which pledged them collectively to a loan of some $25m - about $10bn (£5bn) in today's money.
Beside it stood a large gentleman with a walrus moustache, who had forced them into the deal which ended a two-week financial panic that had come close to destroying New York's financial system. That man was J Pierpont Morgan.
From 1903 to 1906 the global economy had boomed and the Dow Jones had doubled.
But the global supply of gold to which all hard currency was pegged had not kept pace, and hard cash was increasingly scarce.
A hundred years later our credit squeeze had its genesis in the infamous sub-prime mortgage market of the US.
The problems of a century ago were far more diverse, though many of them stemmed from London.
The San Francisco quake was one of the triggers behind the crisis
The Boer war had drained British coffers six years before. Lloyd's of London's vast payout to cover insurance losses in the 1906 San Francisco earthquake also sucked cash out of Britain. The Egyptian stock exchange had crashed and the Bank of England dispatched $3m in gold to bail it out.
The real crisis came in October and centred on the trust companies.
These were not the massive conglomerates such as US Steel and Standard Oil, but the thousands of unregulated financial houses that worked like commercial banks.
On Thursday and Friday - 17 and 18 October - there was a run on the Knickerbocker Trust which had been part of a group financing a failed attempt take over United Copper.
The depositors would be back in the queues outside the Trust on Monday - and other trusts too.
What's more, thousands of American rural banks faced with customers needing cash at harvest time would also be pulling millions out of the system.
But where would the cash come from?
A century on, and the Federal Reserve, European Central Bank and, reluctantly, the Bank of England have been offering billions to the financial markets to allow money to flow where it was needed.
In 1907 there were no central banks, no lender of last resort. There was, however, 70-year-old JP Morgan - the single most important financier of the late 19th century.
He was not the richest of the so-called Robber Barons, but he had more power than any. His efforts had channelled the wealth of Europe into funding the industrialisation of America.
If Morgan gave his blessing to a deal in railroads, shipping, steel or manufacturing, the European bankers would listen - and back it.
As the Knickerbocker Trust prepared to face its depositors on the Monday, Morgan set up his headquarters with five lieutenants in his luxurious Library on Madison Avenue.
World markets feared another market crash 100 years on
His team's job was, like a central bank today, to work out which institutions were solvent and which could be supported.
They worked through the week - day and night poring over accounts, deciding who to save and who to let go.
To counter market rumours they set up an evening public relations service, dealing out reassuring bulletins for morning papers. Behind them, chomping on a cigar, sometimes calmly playing at solitaire, sat Morgan, mulling the fate of the trusts and banks before him.
The Knickerbocker was forced to close, but early on Tuesday newspaper headlines that claimed Morgan was to help the Trust Company of America, or TCA, had depositors queuing outside its doors within hours.
Cash was haemorrhaging from other trusts too.
Line in the sand
But Morgan decided TCA was where he could stop the rot.
On Tuesday night - now sneezing and coughing with a wretched cold - he assembled the heads of a group of banks and trust companies. As they talked around him an exhausted Morgan fell asleep in his chair.
Coming round from his slumber he simply demanded each subscribe to a loan.
With the sheer force of his personality, expressed, it is said, through his terrifying eyes, they pledged $8.25m.
The next day Morgan was greeted by cheers as he drove to his office.
But the crisis was not over and shifted instead to the stock exchange which crashed.
Today, the credit markets have been sweating with interbank rates around 7%.
On Wednesday, 22 October 1907, banks refused to lend to brokers at anything under 100% interest.
Morgan pushed banks to pitch in and help end the crisis
Again Morgan brought the banks together, $25m was corralled from them and as a messenger was sent over to the exchange with the news, traders ripped his coat off in the mounting hysteria.
But within 24 hours rumours sent the markets into a further panic.
Once more the banks were bullied into divvying up another $10m.
By the weekend Morgan's performance had been such that London was prepared to ship some $20m in gold out to support the New York institutions, and all that following week Morgan's team worked to shore up the trusts and banks that were threatened daily by panicking depositors.
On the brink
On Friday came the final crisis: Lincoln Trust and the TCA still needed more cash and the largest brokerage on Wall Street, Moore & Schley looked close to collapse as its creditors demanded repayments of some $35m in loans.
The only security it had were shares in the Tennessee Coal Iron and Railroad Company which had halved in value in the last year.
Morgan's solution was for his own US Steel to buy out TC&I, shore up Moore and Schley and twist the arms of the bankers one more time to support the trusts.
On Sunday 3 November, some 50 bankers and steel executives gathered in Morgan's Library. By early evening the steel deal was done, but the trusts were still deep in discussion.
One of Morgan's officers, Ben Strong, tried to leave but the Library doors were bolted. Morgan had the key and wasn't going to let anyone out until the paper was signed.
As Morgan confronted the assembled throng no one appeared willing to move.
Morgan placed his hand on the shoulder of the elderly Edward King, head of the Union Trust. "There's the place, King," he said, "and here's the pen."
One by one they put their names to the $25m rescue package.
Hero and villain
The crisis was over. But Morgan was both hero and villain.
Mr Morgan's intervention preceded the creation of the Federal Reserve
He had stemmed the run on the trusts and saved the financial system.
But it was thought he had used the crisis, maybe even engineered it all from the start, to buy shares in yet more companies on the cheap - in particular yet another steel firm to add to his already massive US Steel empire.
Indeed, the tide was turning against Morgan and his like.
The anti-trust movement gathered pace - using the takeover of TC&I as a prime example of the abuse of monopolistic power.
Morgan's era - the age of the Robber Baron - was coming to a close and in 1913 when he died the Federal Reserve Act started to institutionalise the power he had wielded so effectively in 1907.