Efforts by troubled UK lender Bradford & Bingley to raise £400m have been rescued after a would-be investor pulled out, the BBC has learned.
US private equity house Texas Pacific Group (TPG) has made a last-minute decision to walk away from a deal to provide almost half of the equity.
But leading City institutions have rallied round to provide the capital, says BBC Business editor Robert Peston.
There should be no concerns about B&B's fundamental soundness, bankers say.
TPG had pledged to pay £179m for a 23% stake in the lender.
But it backed away from investing the new money after Moody's, the credit rating agency, announced it was downgrading the debt of B&B.
The rest of the £400m is to come from shareholders in a rights issue.
The city watchdog, the Financial Services Authority, has played a central role in helping to organise what will be seen as an emergency fund-raising, our business editor said.
The institutions behind the rescue are the ones that were behind Clive Cowdery's recent attempt to take control of B&B.
Mr Cowdery, who runs investment group Resolution, already owns a 2.9% stake in B&B.
He walked away after he was refused access to B&B's books by the bank's board, led by the chairman, Rod Kent.
WHAT IS A RIGHTS ISSUE?
Companies issue extra shares to raise money
They are offered to existing shareholders, usually at a discount to the current share price
Shares are offered in proportion to existing holdings, so if you own 10% of the old shares you are offered 10% of the new ones
"It would have been disastrous for confidence in the bank if new money was not found to replace TPG," said our business editor.
"TPG's decision to turn its back on B&B, having initially been characterised as the brave rescuer of the bank, may well lead to it facing criticism."
Mr Kent's decision to pin his hopes on TPG now look to have been misplaced, our business editor added.
"Some shareholders may question whether he should remain at the helm of the bank."
Observers say that B&B's shares are likely to be hit when trading opens on Friday on the back of the Moody's downgrade.
Under Resolution's plan, the group would have invest £2bn in the banking sector over the next two years, bringing together banks and lenders hit by the credit turmoil to create a "new, larger and stronger bank".
But B&B rejected the plan, refusing to open its books to Resolution saying it would mean Resolution in effect taking control of the company.