It was looking pretty bleak there for a while. Countrywide Financial (NYSE:CFC) found itself caught in the vise of one of the worst credit crunches of recent memory; buyers of loans have stepped away from the table, and mortgage defaults have been quickly and painfully rising.

Led by the scrappy Angelo Mozilo, who helped co-found the company almost 40 years ago, the lender has continued to paddle away and keep its head above water. It has fought off the claims from an analyst at Merrill Lynch (NYSE:MER) that it could end up bankrupt, but was also forced to draw down its entire $11.5 billion of available credit to keep adequate liquidity.

The stock, which finished Monday down 42% from the prior year, found some respite in the rumors that legendary investor Warren Buffett of Berkshire Hathaway (NYSE:BRK-A) (NYSE:BRK-B) could be looking at investing in Countrywide -- even if the rumors were unlikely.

A major helping hand came into the picture Wednesday evening, though, when financial giant Bank of America (NYSE:BAC) announced that it would be investing $2 billion in Countrywide. Strangely enough, if we play six degrees to Warren Buffett, we can trace a path back to him through the $450 million stake that Berkshire holds in Bank of America -- a relatively recent position for Berkshire.

The investment is a boon to Countrywide, because it not only gives it needed liquidity, but it also shows that it has the confidence of one of the largest global financial institutions. Though it's not a massive investment when you consider that Countrywide carries over $200 billion of assets on its balance sheet, it does imply that unless things get far worse, B of A will likely be there with some more cash if needed.

Though helpful to Countrywide, the investment wasn't an overly bullish note for the stock. It was structured as non-voting convertible preferred shares yielding 7.25% and sporting an $18 conversion price -- a 21% discount to where the shares closed on Wednesday. Initial investor excitement, which sent the stock up 20% in after-hours trading on Wednesday, waned into Thursday and the stock was up less than 1% as of this writing.

The news rings a happy note not only for Countrywide, but also for other struggling financial institutions, because it suggests that the major money players that dodged the mortgage bullet could be ready to spend some money. For those that thought Buffett would be the one to take the Countrywide plunge, don't worry, there are plenty of other opportunities out there for Berkshire. Maybe Bear Stearns (NYSE:BSC) could be a consideration?

More financial Foolishness:

Fool contributor Matt Koppenheffer owns shares of Bank of America, but does not own shares of any of the other companies mentioned. Berkshire Hathaway has been recommended in both our Motley Fool Inside Value and our Stock Advisor services. Bank of America is an Income Investor recommendation. The Fool's disclosure policy went with a 30-year fixed mortgage when it bought its house -- none of this negative amortization reverse polish ballooning krypton rate mortgage nonsense.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.