NEW YORK (Fortune) -- Late last summer, Bank of America and its deal-hungry chief Kenneth Lewis won kudos for a $2 billion investment in Countrywide Financial, the once high-flying mortgage lender hit hard by the housing slump.

In one stroke, Lewis erased his reputation as a serial over-payer with the kind of convertible preferred stock deal that arbitrage traders dream of. In exchange for its $2 billion, Bank of America secured the right to buy Countrywide (CFC, Fortune 500) stock at $18, a tidy 21 percent discount over the price at the time. Lewis, it seemed, had deftly locked in an instant $424 million profit for the bank.

Nobody's congratulating Bank of America these days. As Countrywide shares tank and speculation mounts that the company will be forced into bankruptcy, the bank's stake has plunged in value, to about $560 million. Now Bank of America faces a tough choice: It can buy Countrywide outright, pour even more money into the lender, or simply bide its time and hope for the best.

Whatever it does, Bank of America no longer appears so savvy. And Lewis, who's been criticized for paying top dollar for, among other companies, credit-card lender MBNA ($35 billion) and U.S. Trust ($3.3 billion), is once again looking like a spendthrift.

Bank of America and Countrywide declined comment.

Their deal looked so simple when it was announced in August. In return for its cash, Bank of America (BAC, Fortune 500) got a 7.25 percent yield on convertible preferred stock and the right to buy 111 million Countrywide shares, equal to a 16 percent stake. The bank also got the right of first refusal on any future Countrywide deals and stood in front of the creditors' line should the lender go bankrupt.

Lewis and Countrywide CEO Angelo Mozilo, known for his perpetual tan and wide grin, somberly proclaimed the importance of the investment in stabilizing the then-turbulent mortgage secondary markets. The markets seemed to agree.

The celebration didn't last long. The mortgage market has continued to tumble along with Countrywide's stock. Meanwhile, the company faces a barrage of federal and state investigations of its lending and accounting practices. As Countrywide's troubles have mounted, so has speculation that it would file for bankruptcy.

On Tuesday, for the second time in five months, Countrywide was forced to take the unusual move of issuing a press release denying that it was planning to seek protection from its creditors. On Wednesday, the Calabasas, Calif.-based lender released what it claimed was further proof of its stability: The amount of mortgages funded had risen above expectations, which is ordinarily good news.

Investors, however, weren't buying it, and for good reason. Buried deep in Countrywide's release were some troubling numbers: Foreclosures had doubled to 1.4 percent of unpaid principal at its key servicing unit. Late payments also skyrocketed, to 7.2 percent of unpaid balances, up from 4.6 percent. Countrywide shares have plunged 11 percent since this week's damage control began.

Now Bank of America faces a quandary: The value of its investment is falling fast, but any move - whether to buy Countrywide, invest more money, or sit tight - carries a host of potential liabilities.

If it buys Countrywide, Bank of America gets a nationally known franchise and potentially millions of clients for its suite of higher-margin consumer banking offerings, to say nothing of becoming America's most important home lender and the further economies of scale that brings.

On the downside, Bank of America would also get a lender whose credit quality is deteriorating rapidly - and who has sworn off high-margin subprime lending, essentially eliminating what was once its most attractive business. Countrywide is now banking on razor-thin margin conforming loans.

There is also the matter of Bank of America's appetite for Countrywide's portfolio. Ten percent of the lender's portfolio is invested in subprime mortgage securities, including billions worth of securitized and "raw" home equity loans (known as "HELOCS" on Wall Street) and adjustable rate mortgage securities, or ARMS, whose interest rates might prove very troubling to struggling homeowners.

This risky mix may be too much for credit-sensitive Bank of America to stomach. It could try to shed billions of dollars worth of these securities, but finding buyers would be difficult: There's zero appetite for these investments among potential buyers, who would accept nothing short of fire-sale prices. Brokers like Merrill Lynch (MER, Fortune 500), Morgan Stanley (MS, Fortune 500) and Citigroup (C, Fortune 500), meanwhile, have their own, well-documented balance sheet problems.

Option B - dumping more money into Countrywide - is unlikely too, at least in the short run. Upping its investment means believing that Countrywide's operating environment is stabilizing or even may slightly improve. To do that, however, Bank of America has to overlook Wednesday's disclosure about rising foreclosure and late payment rates. That won't be easy.

This leaves the third option, the one that Bank of America is most likely to pursue: Keeping its fingers-crossed. Still, it can't be easy for Bank of America's shareholders to watch more than billion dollars evaporate on what was clearly no more than a timing trade on the mortgage market.

They've already watched Bank of America shares fall 25 percent since October, as concerns grow over the health of the U.S. banking sector.