Two British bank giants, HBOS and Royal Bank of Scotland, were on the verge of collapse in the second week of October, the BBC's Panorama has revealed.
The banks were having problems getting short-term funding amid the global credit crunch.
Without this funding, which is easy to access in non-crisis times, the banks would collapse, authorities believed.
The banks were forced to receive additional capital by getting loans and guarantees from taxpayers.
After crisis talks, the Treasury and the Bank of England provided banks with £350bn in loans and guarantees, stabilising the banking system and preventing HBOS and RBS from collapsing.
"There was very little time. The government was announcing the terms on which it was prepared to come in and the banks had to think about it but they broadly had to accept it," the deputy governor of the Bank of England, Sir John Gieve told BBC business editor Robert Peston.
"We had done some sums and between us we'd come up with what we thought was necessary and really there was only one provider [the taxpayer]."
Sir John Gieve added that RBS boss Sir Fred Goodwin had said "you know it's more a drive-by shooting than a negotiation".
Rescuing the system
RBS has received £20bn and taxpayers now own a 58% stake in the bank.
HBOS and Lloyds TSB are set to get £17bn, with the largest part of the sum going into HBOS.
Shareholders of the two banks have approved their merger, and taxpayers are likely to receive a stake of more than 40% in the newly formed superbank.
The Chancellor of the Exchequer Alistair Darling told Panorama the entire banking system needed to be rescued at the beginning of October.
"We couldn't get ourselves into a situation where you're simply fixing one problem because the problem was then moved to somebody else and you know we just couldn't allow that to carry on happening," he said.
"Things did get worse during that week because confidence was just draining out of the system and in some ways that made it easier for us to talk to the banks and say 'look we're all in this together."