In the latest chapter of Bank of America's (BAC -1.07%) seemingly endless legal drama, it looks like the reports of an imminent $12 billion settlement with the Justice Department arrived too soon.

According to the latest news, the deal has stalled after the Justice Department surprisingly rejected Bank of America's latest settlement offer of more than $12 billion.

Shares are now nearly 15% off highs reached in March. So, should shareholders get out, or stay the course?

What comes next?
This is a tough question to answer. The Justice Department is reportedly seeking a settlement of around $17 billion, accusing the bank of selling subpar mortgages which caused investors to lose billions of dollars. So, it is safe to say the two parties are still pretty far apart.

Many of the mortgage securities in question were sold by Merrill Lynch before Bank of America acquired the struggling firm. Normally, any of an acquired company's liabilities would pass to its acquirer. However, Bank of America has made it clear that it felt pressured by the Federal Reserve and Treasury to complete the acquisition, and as such feels the penalties are unreasonably harsh.

Still, even though the Justice Department is preparing a civil complaint against Bank of America, an actual lawsuit is still not certain, or even probable.

It'll all be over soon
One thing is certain – Bank of America is ready to put the mortgage crisis firmly in the past. For this reason alone, a lawsuit is simply not a good option for them. It could take years, which Bank of America definitely doesn't want.

The option is still on the table for Bank of America to raise its offer to avoid a suit, and that's what is most likely to happen here, it's just a question of when and for how much.

Bear in mind that Bank of America and all of the other banks in similar situations have been setting aside money for settlements like this. Whatever this settlement ends up being, it's not all coming out of the bank's quarterly earnings and producing massive losses. Some of the cost has been planned for in the form of legal reserves.

Additionally, the earliest figure being tossed around was a $20 billion settlement, which would have included the $6.3 billion cash portion of the deal the bank subsequently made with the FHFA. So, the remaining part of the settlement was originally estimated to be about $13.7 billion, give or take, so it's pretty safe to assume the bank has planned ahead for at least that amount. The recently reported $12 billion figure was on the low side, so there is definitely some wiggle room for negotiating.

One thing we can say about the banks is they aren't getting caught off-guard by these settlements. And, Bank of America has more experience than most of its peers in this sort of thing, having already paid or agreed to pay about $60 billion in legal settlements in recent years.

Patience is a virtue
CEO Brian Moynihan said the Justice Department settlement will be the last big one the bank will face as a result of the mortgage crisis, so the "settlement era" will be over sooner rather than later. All of Bank of America's management had hoped for a swifter end to the mortgage-related legal issues, but it is what it is.

Don't let the 11-figure settlement headlines cloud your judgment on Bank of America. As fellow Motley Fool Financials writer Jordan Wathen found in his recent valuation of the bank, most of its business segments are not only much improved from since the crisis, but are thriving. In particular, the consumer banking and GWIM (global wealth and investment management) businesses are doing incredibly well.

In all, Bank of America is worth considerably more than its trading for right now (about 20% more, according to the part-by-part analysis). Once the legal drama is over, it won't be on sale like this forever. Just have a little patience...