Problems with mortgage documents Bank of American acquired when it purchased the mortgage provider Countrywide Financial in 2008 could cost the bank billions, if a testimony in a New Jersey foreclosure case proves accurate.

During the foreclosure trial, an operational team leader for Bank of America, Linda DiMartini, said it was "customary for Countrywide to maintain possession of the original note and related documents."

If her testimony is proven, Countrywide may have not properly transferred the necessary mortgage documents when it sold loans to other banks who then used the loans to create residential mortgage backed securities (RMBS).

"There's been talk on the street for years that banks didn't send the notes up the line when they did securitizations," Max Gardner, a consumer bankruptcy attorney, told Daily Finance. "But this is the first time I've seen someone under oath admit there was a policy not to deliver the notes. I had to read it twice to make sure that's really what she said, but she did: It was customary."

If the mortgage notes were not properly distributed to the different parties involved, the foreclosure process could be stopped by anyone who asked where the mortgage note is or who holds it.

That would mean anyone whose home is being foreclosed upon can legitimately refuse to leave by demanding their creditors produce the note.

"If you are about to lose your home at least make them produce the note," Chris Hoyer of Consumer Warning Network told CNN. "Make them prove first that they have the note and the IOU and the person standing in the court is the person authorized by the owner to take your home."

A woman in Florida used the "produce the note" tactic quite successfully in 2008, after a judge ruled the bank did not have the right to proceed with its foreclosure against her. The bank decided to renegotiate the terms of the loan, rather than continue the court battle.

If mortgage-backed securities aren't in fact "mortgage-backed," investors who bought these securities from Countrywide could hold Bank of America accountable.

"If Countrywide's practice was to hold onto the note, then investors in this pool and others may question whether the security was constructed properly and legally and may be able to require Bank of America to buy back their securities," Gretchen Morgenson of the New York Times explained.

Since an estimated 96% of Countrywide's were securitized, and apparently all securitized improperly, Bank of America could be forced to buy back millions of loans.