A Plum man has filed a lawsuit challenging the legality of the process by which millions of mortgages have been turned into investment vehicles, and then made the subjects of foreclosure filings.

Jayson Schott, in a complaint filed in U.S. District Court Tuesday, said he got a $97,500 adjustable rate mortgage from America's Wholesale Lender in 2004. The rate went up, and he went into default. Bank of America, which bought America's Wholesale Lender, filed for foreclosure in 2008.

In the meantime, though, Mr. Schott's mortgage was "securitized" -- bundled into an investment vehicle called a Real Estate Mortgage Investment Conduit, by which it was converted into a tax-exempt investment. Thousands of shareholders bought stakes in the REMIC, according to the lawsuit by Durham, N.C., attorney Luke Lucas.

The mortgage thus became a stock, Mr. Lucas wrote. Because mortgages and stocks are entirely separate under U.S. law, it ceased to become a loan secured by a house, according to the lawsuit.

When it went into default, the investors got a tax credit from the IRS, further nixing the note, according to Mr. Lucas' thinking. So the foreclosure was invalid, he wrote.

"You can't make oranges out of orange juice, and once the note is securitized, it is orange juice," Mr. Lucas said in a phone interview.

Mr. Lucas said he has filed several dozen similar lawsuits nationally, though this is the first in Western Pennsylvania. If his contention were broadly approved by courts, it could undermine efforts to collect or foreclose on millions of mortgages, and he acknowledged that it would "take a brave judiciary" to do that.

The lawsuit alleges violations of multiple federal laws, and seeks cancellation of Mr. Schott's debt, repayment of interest paid times three, and damages including punitive damages. It has been assigned to U.S. District Judge Terrence F. McVerry.

Besides Bank of America and several of its subsidiaries, the lawsuit names Bank of New York Mellon as a defendant, because it became the trustee for the investment vehicle. Spokespersons for Bank of America and Bank of New York Mellon were not immediately available for comment.